/** @example "USD" */
export type Currency = "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BIF" | "BMD" | "BND" | "BOB" | "BRL" | "BSD" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHF" | "CLF" | "CLP" | "CNY" | "COP" | "CRC" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "ISK" | "JMD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KRW" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRO" | "MUR" | "MVR" | "MWK" | "MXN" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "STD" | "SZL" | "THB" | "TJS" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "UYU" | "UZS" | "VND" | "VUV" | "WST" | "XAF" | "XCD" | "XOF" | "XPF" | "YER" | "ZAR" | "ZMW";
/** @example "US" */
export type Country = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
/** @example "America/Los_Angeles" */
export type Timezone = "UTC" | "Africa/Algiers" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Monrovia" | "Africa/Nairobi" | "America/Argentina/Buenos_Aires" | "America/Bogota" | "America/Caracas" | "America/Chicago" | "America/Chihuahua" | "America/Denver" | "America/Guatemala" | "America/Guyana" | "America/Halifax" | "America/Indiana/Indianapolis" | "America/Juneau" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Mazatlan" | "America/Mexico_City" | "America/Monterrey" | "America/Montevideo" | "America/New_York" | "America/Nuuk" | "America/Phoenix" | "America/Puerto_Rico" | "America/Regina" | "America/Santiago" | "America/Sao_Paulo" | "America/St_Johns" | "America/Tijuana" | "Asia/Almaty" | "Asia/Baghdad" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Chongqing" | "Asia/Colombo" | "Asia/Dhaka" | "Asia/Hong_Kong" | "Asia/Irkutsk" | "Asia/Jakarta" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kathmandu" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuwait" | "Asia/Magadan" | "Asia/Muscat" | "Asia/Novosibirsk" | "Asia/Riyadh" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tokyo" | "Asia/Ulaanbaatar" | "Asia/Urumqi" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Cape_Verde" | "Atlantic/South_Georgia" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Darwin" | "Australia/Hobart" | "Australia/Melbourne" | "Australia/Perth" | "Australia/Sydney" | "Europe/Amsterdam" | "Europe/Athens" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Helsinki" | "Europe/Istanbul" | "Europe/Kaliningrad" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Madrid" | "Europe/Minsk" | "Europe/Moscow" | "Europe/Paris" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/Sarajevo" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "GMT+12" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Chatham" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Majuro" | "Pacific/Midway" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Port_Moresby" | "Pacific/Tongatapu";
/** Billing entity object */
export interface BillingEntityObject {
    /**
     * A unique identifier for the billing entity in the Lago application
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The unique code of the billing entity
     * @example "acme_corp"
     */
    code: string;
    /**
     * The name of the billing entity
     * @example "Acme Corp"
     */
    name: string;
    /**
     * The default currency of the billing entity
     * @example "USD"
     */
    default_currency: Currency;
    /**
     * The language of the documents generated for this billing entity
     * @example "en"
     */
    document_locale: string;
    /**
     * The type of document numbering for this billing entity:
     * - `per_customer`: document numbers are unique per customer
     * - `per_billing_entity`: document numbers are unique per billing entity
     * @example "per_customer"
     */
    document_numbering: "per_customer" | "per_billing_entity";
    /**
     * The prefix used in document numbers for this billing entity
     * @example "ABC-123"
     */
    document_number_prefix?: string | null;
    /**
     * Whether to finalize invoices with zero amount for this billing entity
     * @example true
     */
    finalize_zero_amount_invoice: boolean;
    /**
     * The footer text to be displayed on invoices for this billing entity
     * @example "Thank you for your business"
     */
    invoice_footer?: string | null;
    /**
     * The grace period (in days) for invoice finalization
     * @example 0
     */
    invoice_grace_period: number;
    /**
     * Defines whether the issuing date follows the current billing period's end date or the next period starting date.
     * @default "next_period_start"
     */
    subscription_invoice_issuing_date_anchor?: "current_period_end" | "next_period_start";
    /**
     * The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.
     * @default "align_with_finalization_date"
     */
    subscription_invoice_issuing_date_adjustment?: "align_with_finalization_date" | "keep_anchor";
    /**
     * Whether this billing entity is the default billing entity for the organization. Default billing entity will be used as fallback in services if no billing entity is specified when billing_entity is not provided. Default billing entity is the billing entity that will be used to generate invoices if no billing entity is specified when invoice is created. is the oldest active billing entity and this flag cannot be changed
     * @example false
     */
    is_default?: boolean;
    /**
     * The net payment term (in days) for this billing entity
     * @example 0
     */
    net_payment_term: number;
    /**
     * The first line of the billing address
     * @example "5230 Penfield Ave"
     */
    address_line1?: string | null;
    /**
     * The second line of the billing address
     * @example "Suite 100"
     */
    address_line2?: string | null;
    /**
     * The city of the billing address
     * @example "Woodland Hills"
     */
    city?: string | null;
    /**
     * The state of the billing address
     * @example "CA"
     */
    state?: string | null;
    /** The country code of the billing address */
    country?: Country | null;
    /**
     * The zipcode of the billing address
     * @example "91364"
     */
    zipcode?: string | null;
    /**
     * The email address of the billing entity
     * @format email
     * @example "billing@acme.com"
     */
    email?: string | null;
    /**
     * The legal name of the billing entity
     * @example "Acme Corporation"
     */
    legal_name?: string | null;
    /**
     * The legal registration number of the billing entity
     * @example "US123456789"
     */
    legal_number?: string | null;
    /**
     * The tax identification number of the billing entity
     * @example "EU123456789"
     */
    tax_identification_number?: string | null;
    /**
     * The timezone of the billing entity
     * @example "UTC"
     */
    timezone: Timezone;
    /** The email notification settings for this billing entity */
    email_settings?: ("invoice.finalized" | "credit_note.created" | "payment_receipt.created")[];
    /**
     * Whether EU tax management is enabled for this billing entity
     * @example false
     */
    eu_tax_management?: boolean;
    /**
     * The URL of the billing entity's logo
     * @format uri
     * @example "https://getlago.com/logo.png"
     */
    logo_url?: string | null;
    /**
     * The date and time when the billing entity was created
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /**
     * The date and time when the billing entity was last updated
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    updated_at: string;
}
export interface ApiErrorUnauthorized {
    /**
     * @format int32
     * @example 401
     */
    status: number;
    /** @example "Unauthorized" */
    error: string;
}
export interface ApiErrorUnprocessableEntity {
    /**
     * @format int32
     * @example 422
     */
    status: number;
    /** @example "Unprocessable entity" */
    error: string;
    /** @example "validation_errors" */
    code: string;
    error_details: object;
}
/** Billing entity create input */
export interface BillingEntityCreateInput {
    billing_entity: {
        /**
         * The unique code of the billing entity
         * @example "acme_corp"
         */
        code: string;
        /**
         * The name of the billing entity
         * @example "Acme Corp"
         */
        name: string;
        /**
         * The default currency of the billing entity
         * @example "USD"
         */
        default_currency?: Currency;
        /**
         * The type of document numbering for this billing entity:
         * - `per_customer`: document numbers are unique per customer
         * - `per_billing_entity`: document numbers are unique per billing entity
         */
        document_numbering?: "per_customer" | "per_billing_entity";
        /**
         * The prefix used in document numbers for this billing entity
         * @example "ABC-123"
         */
        document_number_prefix?: string | null;
        /**
         * Whether to finalize invoices with zero amount for this billing entity
         * @example true
         */
        finalize_zero_amount_invoice?: boolean;
        billing_configuration?: {
            /**
             * The footer text to be displayed on invoices for this billing entity
             * @example "Thank you for your business"
             */
            invoice_footer?: string;
            /**
             * The language of the documents generated for this billing entity
             * @example "en"
             */
            document_locale?: string;
            /**
             * The grace period (in days) for invoice finalization
             * @example 0
             */
            invoice_grace_period?: number;
            /**
             * Defines whether the issuing date follows the current billing period's end date or the next period starting date.
             * @default "next_period_start"
             */
            subscription_invoice_issuing_date_anchor?: "current_period_end" | "next_period_start";
            /**
             * The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.
             * @default "align_with_finalization_date"
             */
            subscription_invoice_issuing_date_adjustment?: "align_with_finalization_date" | "keep_anchor";
        };
        /**
         * The net payment term (in days) for this billing entity
         * @example 0
         */
        net_payment_term?: number;
        /**
         * The first line of the billing address
         * @example "5230 Penfield Ave"
         */
        address_line1?: string | null;
        /**
         * The second line of the billing address
         * @example "Suite 100"
         */
        address_line2?: string | null;
        /**
         * The city of the billing address
         * @example "Woodland Hills"
         */
        city?: string | null;
        /**
         * The state of the billing address
         * @example "CA"
         */
        state?: string | null;
        /** The country code of the billing address */
        country?: Country | null;
        /**
         * The zipcode of the billing address
         * @example "91364"
         */
        zipcode?: string | null;
        /**
         * The email address of the billing entity
         * @format email
         * @example "billing@acme.com"
         */
        email?: string | null;
        /**
         * The legal name of the billing entity
         * @example "Acme Corporation"
         */
        legal_name?: string | null;
        /**
         * The legal registration number of the billing entity
         * @example "US123456789"
         */
        legal_number?: string | null;
        /**
         * The tax identification number of the billing entity
         * @example "EU123456789"
         */
        tax_identification_number?: string | null;
        /**
         * The timezone of the billing entity
         * @example "UTC"
         */
        timezone?: Timezone;
        /** The email notification settings for this billing entity */
        email_settings?: ("invoice.finalized" | "credit_note.created")[];
        /**
         * Whether EU tax management is enabled for this billing entity
         * @example false
         */
        eu_tax_management?: boolean;
        /**
         * The base64 encoded logo image for the billing entity
         * @format uri
         * @example "data:image/png;base64,..."
         */
        logo?: string | null;
    };
}
export interface ApiErrorBadRequest {
    /**
     * @format int32
     * @example 400
     */
    status: number;
    /** @example "Bad request" */
    error: string;
}
export interface ApiErrorForbidden {
    /**
     * @format int32
     * @example 403
     */
    status: number;
    /** @example "Forbidden" */
    error: string;
    /** @example "feature_unavailable" */
    code: string;
}
export interface TaxObject {
    /**
     * Unique identifier of the tax, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Name of the tax.
     * @example "TVA"
     */
    name: string;
    /**
     * Unique code used to identify the tax associated with the API request.
     * @example "french_standard_vat"
     */
    code: string;
    /**
     * Internal description of the tax
     * @example "French standard VAT"
     */
    description?: string | null;
    /**
     * The percentage rate of the tax
     * @example 20
     */
    rate: number;
    /**
     * This field is deprecated and will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.
     * @deprecated
     * @example true
     */
    applied_to_organization: boolean;
    /**
     * Creation date of the tax.
     * @format date-time
     * @example "2023-07-06T14:35:58Z"
     */
    created_at: string;
}
export interface InvoiceCustomSectionObject {
    /**
     * Unique identifier for the invoice custom section in the Lago application, generated by Lago to ensure record uniqueness within the system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Name of the invoice custom section.
     * @example "EU Bank Details"
     */
    name: string;
    /**
     * Unique code identifying the invoice custom section for the API request.
     * @example "eu_bank_details"
     */
    code: string;
    /**
     * Internal description of the invoice custom section.
     * @example "This section contains the bank details for EU customers."
     */
    description?: string;
    /**
     * The value shown on the invoice PDF.
     * @example "Bank Name: Lago Bank, IBAN: FR7630004000031234567890143"
     */
    details?: string;
    /**
     * The name of the invoice custom section displayed on the invoice.
     * @example "Bank Details:"
     */
    display_name?: string;
    /**
     * This field is deprecated and will be removed in a future version. When set to true, it applies the invoice custom section to the organization's default billing entity. To apply or remove an invoice custom section from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.
     * @deprecated
     * @example true
     */
    applied_to_organization?: boolean;
    /**
     * Unique identifier for the organization associated with the invoice custom section.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    organization_id?: string;
    /**
     * Creation date of the tax.
     * @format date-time
     * @example "2023-07-06T14:35:58Z"
     */
    created_at?: string;
}
export type BillingEntityObjectExtended = BillingEntityObject & {
    taxes?: TaxObject[];
    selected_invoice_custom_sections?: InvoiceCustomSectionObject[];
};
export interface ApiErrorNotFound {
    /**
     * @format int32
     * @example 404
     */
    status: number;
    /** @example "Not Found" */
    error: string;
    /** @example "object_not_found" */
    code: string;
}
/**
 * List of unique code used to identify the taxes.
 * @example ["french_standard_vat"]
 */
export type TaxCodes = string[];
/** Billing entity update input */
export interface BillingEntityUpdateInput {
    /**
     * The name of the billing entity
     * @example "Acme Corp"
     */
    name?: string;
    /**
     * The default currency of the billing entity
     * @example "USD"
     */
    default_currency?: Currency;
    /**
     * The type of document numbering for this billing entity:
     * - `per_customer`: document numbers are unique per customer
     * - `per_billing_entity`: document numbers are unique per billing entity
     */
    document_numbering?: "per_customer" | "per_billing_entity";
    /**
     * The prefix used in document numbers for this billing entity
     * @example "ABC-123"
     */
    document_number_prefix?: string | null;
    /**
     * Whether to finalize invoices with zero amount for this billing entity
     * @example true
     */
    finalize_zero_amount_invoice?: boolean;
    billing_configuration?: {
        /**
         * The footer text to be displayed on invoices for this billing entity
         * @example "Thank you for your business"
         */
        invoice_footer?: string;
        /**
         * The language of the documents generated for this billing entity
         * @example "en"
         */
        document_locale?: string;
        /**
         * The grace period (in days) for invoice finalization
         * @example 0
         */
        invoice_grace_period?: number;
        /**
         * Defines whether the issuing date follows the current billing period's end date or the next period starting date.
         * @default "next_period_start"
         */
        subscription_invoice_issuing_date_anchor?: "current_period_end" | "next_period_start";
        /**
         * The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.
         * @default "align_with_finalization_date"
         */
        subscription_invoice_issuing_date_adjustment?: "align_with_finalization_date" | "keep_anchor";
    };
    /**
     * The net payment term (in days) for this billing entity
     * @example 0
     */
    net_payment_term?: number;
    /**
     * The first line of the billing address
     * @example "5230 Penfield Ave"
     */
    address_line1?: string | null;
    /**
     * The second line of the billing address
     * @example "Suite 100"
     */
    address_line2?: string | null;
    /**
     * The city of the billing address
     * @example "Woodland Hills"
     */
    city?: string | null;
    /**
     * The state of the billing address
     * @example "CA"
     */
    state?: string | null;
    /** The country code of the billing address */
    country?: Country | null;
    /**
     * The zipcode of the billing address
     * @example "91364"
     */
    zipcode?: string | null;
    /**
     * The email address of the billing entity
     * @format email
     * @example "billing@acme.com"
     */
    email?: string | null;
    /**
     * The legal name of the billing entity
     * @example "Acme Corporation"
     */
    legal_name?: string | null;
    /**
     * The legal registration number of the billing entity
     * @example "US123456789"
     */
    legal_number?: string | null;
    /**
     * The tax identification number of the billing entity
     * @example "EU123456789"
     */
    tax_identification_number?: string | null;
    /**
     * The timezone of the billing entity
     * @example "UTC"
     */
    timezone?: Timezone;
    /** The tax codes that should be associated with this billing entity */
    tax_codes?: TaxCodes;
    /** The email notification settings for this billing entity */
    email_settings?: ("invoice.finalized" | "credit_note.created")[];
    /**
     * Whether EU tax management is enabled for this billing entity
     * @example false
     */
    eu_tax_management?: boolean;
    /**
     * The base64 encoded logo image for the billing entity. Sending "null" will remove the logo, if any exist.
     * @format uri
     * @example "data:image/png;base64,..."
     */
    logo?: string | null;
    /**
     * The codes of the invoice custom section that should be associated with this billing entity
     * @example ["custom_section_1","custom_section_2"]
     */
    invoice_custom_section_codes?: string[];
}
export interface ActivityLogObject {
    /**
     * Unique identifier assigned to the activity log within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the activity log record within the Lago system
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    activity_id: string;
    /**
     * The email of the user who performed the activity
     * @format email
     * @example "dinesh@piedpiper.test"
     */
    user_email?: string | null;
    /**
     * This field stores the actitivy action that was performed to the activity_object.
     * @example "billing_metric.created"
     */
    activity_type: string;
    /**
     * This field represents the source of the activity log, the interaction source that triggered the action.
     * @example "api"
     */
    activity_source: "api" | "front" | "system";
    /**
     * This field represents the final state of the object that the action was applied.
     * @format object
     * @example {"lago_id":"dad68bc7-c01a-4ad8-a87b-13e78693a5bc","plan_id":"b9155544-e261-4e92-b54e-f65d7609294c"}
     */
    activity_object?: object | null;
    /**
     * @format object
     * @example {"plan_id":[null,"b9155544-e261-4e92-b54e-f65d7609294c"]}
     */
    activity_object_changes?: object | null;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id?: string | null;
    /**
     * Unique identifier assigned to the subscription in your application.
     * @example "external_id"
     */
    external_subscription_id?: string | null;
    /**
     * The resource id of the object that the action was applied.
     * @format uuid
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    resource_id: string;
    /**
     * The resource type of the resource_id record.
     * @example "BillableMetric"
     */
    resource_type: string;
    /**
     * Unique identifier for the organization associated with the activity log.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    organization_id: string;
    /**
     * The logged date of the activity, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). It provides the precise timestamp of when the event's record was created within the Lago application
     * @format date-time
     * @example "2025-03-31T12:31:44Z"
     */
    logged_at: string;
    /**
     * The creation date of the activity record in the Lago application, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). It provides the precise timestamp of when the event's record was created within the Lago application
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
}
export interface PaginationMeta {
    /**
     * Current page.
     * @example 2
     */
    current_page: number;
    /**
     * Next page.
     * @example 3
     */
    next_page?: number | null;
    /**
     * Previous page.
     * @example 1
     */
    prev_page?: number | null;
    /**
     * Total number of pages.
     * @example 4
     */
    total_pages: number;
    /**
     * Total number of records.
     * @example 70
     */
    total_count: number;
}
export interface ActivityLogsPaginated {
    activity_logs: ActivityLogObject[];
    meta: PaginationMeta;
}
export interface ActivityLog {
    activity_log: ActivityLogObject;
}
export interface AddOnObject {
    /**
     * Unique identifier of the add-on, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The name of the add-on.
     * @example "Setup Fee"
     */
    name: string;
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
     * @example "Setup Fee (SF1)"
     */
    invoice_display_name: string | null;
    /**
     * Unique code used to identify the add-on.
     * @example "setup_fee"
     */
    code: string;
    /**
     * The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value.
     * @example 50000
     */
    amount_cents: number;
    /**
     * The currency of the add-on.
     * @example "USD"
     */
    amount_currency: Currency;
    /**
     * The description of the add-on.
     * @example "Implementation fee for new customers."
     */
    description: string | null;
    /**
     * The date and time when the add-on was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the add-on was initially created.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /** All taxes applied to the add-on. */
    taxes?: TaxObject[];
}
export interface AddOnsPaginated {
    add_ons: AddOnObject[];
    meta: PaginationMeta;
}
export interface AddOnBaseInput {
    /**
     * The name of the add-on.
     * @example "Setup Fee"
     */
    name?: string;
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
     * @example "Setup Fee (SF1)"
     */
    invoice_display_name?: string | null;
    /**
     * Unique code used to identify the add-on.
     * @example "setup_fee"
     */
    code?: string;
    /**
     * The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value.
     * @example 50000
     */
    amount_cents?: number;
    /**
     * The currency of the add-on.
     * @example "USD"
     */
    amount_currency?: Currency;
    /**
     * The description of the add-on.
     * @example "Implementation fee for new customers."
     */
    description?: string | null;
    /** List of unique code used to identify the taxes. */
    tax_codes?: TaxCodes;
}
export interface AddOnCreateInput {
    add_on: AddOnBaseInput;
}
export interface AddOn {
    add_on: AddOnObject;
}
export interface AddOnUpdateInput {
    add_on: AddOnBaseInput;
}
export interface ApiLogObject {
    /**
     * Lago API version used in the request.
     * @example "v1"
     */
    api_version: string;
    /**
     * The client used to make the request to the API.
     * @example "Lago Ruby v1.26.0"
     */
    client: string;
    /**
     * This field represents the HTTP method of the request.
     * @example "post"
     */
    http_method: "post" | "put" | "delete";
    /**
     * This field represents the HTTP status of the requests.
     * @example 200
     */
    http_status: number;
    /**
     * The logged date of the api log, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). It provides the precise timestamp of when the event's record was created within the Lago application
     * @format date-time
     * @example "2025-03-31T12:31:44Z"
     */
    logged_at: string;
    /**
     * @format object
     * @example "{ "billable_metric": { "name": "Storage", "code": "storage" } }"
     */
    request_body: string;
    /**
     * This field represents the API origin of the requested URL
     * @example "https://app.lago.dev/"
     */
    request_origin: string;
    /**
     * This field represents the API path of the requested URL
     * @example "/billable_metrics"
     */
    request_path: string;
    /**
     * The creation date of the api log record in the Lago application, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). It provides the precise timestamp of when the event's record was created within the Lago application
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /**
     * Unique identifier for the api log.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    request_id: string;
    /**
     * @format object
     * @example "{ "lago_id": "b9155544-e261-4e92-b54e-f65d7609294c", ... }"
     */
    request_response?: string;
}
export interface ApiLogsPaginated {
    api_logs: ApiLogObject[];
    meta: PaginationMeta;
}
export interface ApiLog {
    api_log: ApiLogObject;
}
export interface GrossRevenueObject {
    /**
     * Identifies the month to analyze revenue.
     * @example "2023-11-01T00:00:00.000Z"
     */
    month: string;
    /**
     * The total amount of revenue for a period, expressed in cents.
     * @example 50000
     */
    amount_cents: number;
    /**
     * The currency of revenue analytics. Format must be ISO 4217.
     * @example "USD"
     */
    currency: Currency;
    /**
     * Contains invoices count.
     * @example 10
     */
    invoices_count: number;
}
export interface GrossRevenues {
    gross_revenues: GrossRevenueObject[];
}
export interface InvoiceCollectionObject {
    /**
     * Identifies the month to analyze revenue.
     * @example "2023-11-01T00:00:00.000Z"
     */
    month: string;
    /**
     * The payment status of the invoices.
     * @example "succeeded"
     */
    payment_status?: "pending" | "succeeded" | "failed";
    /**
     * Contains invoices count.
     * @example 10
     */
    invoices_count: number;
    /**
     * The total amount of revenue for a period, expressed in cents.
     * @example 50000
     */
    amount_cents?: number;
    /**
     * The currency of revenue analytics. Format must be ISO 4217.
     * @example "USD"
     */
    currency?: Currency;
}
export interface InvoiceCollections {
    invoice_collections: InvoiceCollectionObject[];
}
export interface InvoicedUsageObject {
    /**
     * Identifies the month to analyze revenue.
     * @example "2023-11-01T00:00:00.000Z"
     */
    month: string;
    /**
     * The code of the usage-based billable metrics.
     * @example "code1"
     */
    code?: string;
    /**
     * The total amount of revenue for a period, expressed in cents.
     * @example 50000
     */
    amount_cents: number;
    /**
     * The currency of revenue analytics. Format must be ISO 4217.
     * @example "USD"
     */
    currency: Currency;
}
export interface InvoicedUsages {
    invoiced_usages: InvoicedUsageObject[];
}
export interface MrrObject {
    /**
     * Identifies the month to analyze MRR.
     * @example "2023-11-01T00:00:00.000Z"
     */
    month: string;
    /**
     * The total amount of MRR, expressed in cents.
     * @example 50000
     */
    amount_cents: number;
    /**
     * The currency of MRR analytics. Format must be ISO 4217.
     * @example "USD"
     */
    currency: Currency;
}
export interface Mrrs {
    mrrs: MrrObject[];
}
export interface OverdueBalanceObject {
    /**
     * Identifies the month to analyze revenue.
     * @example "2023-11-01T00:00:00.000Z"
     */
    month: string;
    /**
     * The total amount of revenue for a period, expressed in cents.
     * @example 50000
     */
    amount_cents: number;
    /**
     * The currency of revenue analytics. Format must be ISO 4217.
     * @example "USD"
     */
    currency: Currency;
    /**
     * The Lago invoice IDs associated with the revenue.
     * @example ["5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"]
     */
    lago_invoice_ids: string[];
}
export interface OverdueBalances {
    overdue_balances: OverdueBalanceObject[];
}
export interface UsageObject {
    /**
     * The unique identifier of the organization for which the usage analytics is calculated.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    organization_id: string;
    /**
     * The start date of the period for which the usage analytics is calculated.
     * @format date
     * @example "2023-11-01"
     */
    start_of_period_dt?: string;
    /**
     * The end date of the period for which the usage analytics is calculated.
     * @format date
     * @example "2023-11-30"
     */
    end_of_period_dt?: string;
    /**
     * The currency of usage analytics. Format must be ISO 4217.
     * @example "USD"
     */
    amount_currency: Currency;
    /**
     * The total amount for usages for a period, expressed in cents.
     * @example 50000
     */
    amount_cents: number;
    /**
     * The code of the usage-based billable metrics.
     * @example "code1"
     */
    billable_metric_code?: string;
    /**
     * The total number of units for the usage-based billable metrics.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "1.0"
     */
    units?: string;
    /**
     * Indicates whether the billable metric associated with the usage is deleted.
     * @example false
     */
    is_billable_metric_deleted?: boolean;
}
export interface Usages {
    usages: UsageObject[];
}
/** @example "USD" */
export type CurrencyOrNull = "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BIF" | "BMD" | "BND" | "BOB" | "BRL" | "BSD" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHF" | "CLF" | "CLP" | "CNY" | "COP" | "CRC" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "ISK" | "JMD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KRW" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRO" | "MUR" | "MVR" | "MWK" | "MXN" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "STD" | "SZL" | "THB" | "TJS" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "UYU" | "UZS" | "VND" | "VUV" | "WST" | "XAF" | "XCD" | "XOF" | "XPF" | "YER" | "ZAR" | "ZMW";
export interface AppliedCouponObject {
    /**
     * Unique identifier of the applied coupon, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Unique identifier of the coupon, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_coupon_id: string;
    /**
     * Unique code used to identify the coupon.
     * @example "startup_deal"
     */
    coupon_code: string;
    /**
     * The name of the coupon.
     * @example "Startup Deal"
     */
    coupon_name: string;
    /**
     * The status of the parent coupon. Can be either `active` or `terminated`.
     * @example "active"
     */
    coupon_status?: "active" | "terminated";
    /**
     * The date and time when the parent coupon was deleted. If null, the coupon still exists. It is expressed in UTC format according to the ISO 8601 datetime standard.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    coupon_deleted_at?: string | null;
    /**
     * Unique identifier of the customer, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /**
     * The status of the coupon. Can be either `active` or `terminated`.
     * @example "active"
     */
    status: "active" | "terminated";
    /**
     * The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type.
     * @example 2000
     */
    amount_cents?: number | null;
    /**
     * The remaining amount in cents for a `fixed_amount` coupon with a frequency set to `once`. This field indicates the remaining balance or value that can still be utilized from the coupon.
     * @example 50
     */
    amount_cents_remaining?: number | null;
    /**
     * The currency of the coupon. This field is required only for coupon with `fixed_amount` type.
     * @example "EUR"
     */
    amount_currency?: CurrencyOrNull;
    /**
     * The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example null
     */
    percentage_rate?: string | null;
    /**
     * The type of frequency for the coupon. It can have three possible values: `once`, `recurring` or `forever`.
     *
     * - If set to `once`, the coupon is applicable only for a single use.
     * - If set to `recurring`, the coupon can be used multiple times for recurring billing periods.
     * - If set to `forever`, the coupon has unlimited usage and can be applied indefinitely.
     * @example "recurring"
     */
    frequency: "once" | "recurring" | "forever";
    /**
     * Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type
     * @example 3
     */
    frequency_duration?: number | null;
    /**
     * The remaining number of billing periods to which the coupon is applicable. This field determines the remaining usage or availability of the coupon based on the remaining billing periods.
     * @example 1
     */
    frequency_duration_remaining?: number | null;
    /**
     * The date and time after which the coupon will stop applying to customer's invoices. Once the expiration date is reached, the coupon will no longer be applicable, and any further invoices generated for the customer will not include the coupon discount.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    expiration_at?: string | null;
    /**
     * The date and time when the coupon was assigned to a customer. It is expressed in UTC format according to the ISO 8601 datetime standard.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /**
     * This field indicates the specific moment when the coupon amount is fully utilized or when the coupon is removed from the customer's coupon list. It is expressed in UTC format according to the ISO 8601 datetime standard.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    terminated_at?: string | null;
}
export interface CreditObject {
    /**
     * Unique identifier assigned to the credit within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the credit's item record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The amount of credit associated with the invoice, expressed in cents.
     * @example 1200
     */
    amount_cents: number;
    /**
     * The currency of the credit.
     * @example "EUR"
     */
    amount_currency: Currency;
    /**
     * Indicates whether the credit is applied on the amount before taxes (coupons) or after taxes (credit notes). This flag helps determine the order in which credits are applied to the invoice calculation
     * @example false
     */
    before_taxes: boolean;
    /** The item attached to the credit. */
    item: {
        /**
         * Unique identifier assigned to the credit item within the Lago application.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_item_id: string;
        /**
         * The type of credit applied. Possible values are `coupon`, `credit_note` or `invoice` (for `progressive_billing` invoice).
         * @example "coupon"
         */
        type: "coupon" | "credit_note" | "invoice";
        /**
         * The code of the credit applied. It can be the code of the coupon attached to the credit, the credit note's number or the `progressive_billing` invoice number.
         * @example "startup_deal"
         */
        code: string;
        /**
         * The name of the credit applied. It can be the name of the coupon attached to the credit, the initial invoice's number linked to the credit note or the `progressive_billing` invoice number.
         * @example "Startup Deal"
         */
        name: string;
    };
    invoice: {
        /**
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_id: string;
        /** @example "succeeded" */
        payment_status: "pending" | "succeeded" | "failed";
    };
}
export type AppliedCouponObjectExtended = AppliedCouponObject & {
    credits: CreditObject[];
};
export interface AppliedCouponsPaginated {
    applied_coupons: AppliedCouponObjectExtended[];
    meta: PaginationMeta;
}
export interface AppliedCouponInput {
    applied_coupon: {
        /**
         * The customer external unique identifier (provided by your own application)
         * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
         */
        external_customer_id: string;
        /**
         * Unique code used to identify the coupon.
         * @example "startup_deal"
         */
        coupon_code: string;
        /**
         * The type of frequency for the coupon. It can have three possible values: `once`, `recurring` or `forever`.
         *
         * - If set to `once`, the coupon is applicable only for a single use.
         * - If set to `recurring`, the coupon can be used multiple times for recurring billing periods.
         * - If set to `forever`, the coupon has unlimited usage and can be applied indefinitely.
         * @example "recurring"
         */
        frequency?: "once" | "recurring" | "forever";
        /**
         * Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type
         * @example 3
         */
        frequency_duration?: number | null;
        /**
         * The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type.
         * @example 2000
         */
        amount_cents?: number | null;
        /**
         * The currency of the coupon. This field is required only for coupon with `fixed_amount` type.
         * @example "EUR"
         */
        amount_currency?: CurrencyOrNull;
        /**
         * The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example null
         */
        percentage_rate?: string | null;
    };
}
export interface AppliedCoupon {
    applied_coupon: AppliedCouponObject;
}
/** Values used to apply differentiated pricing based on additional event properties. */
export interface BillableMetricFilterObject {
    /**
     * Filter key to add to the event properties payload
     * @example "region"
     */
    key: string;
    /** List of possible filter values */
    values: string[];
}
export interface BillableMetricObject {
    /**
     * Unique identifier of the billable metric created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Name of the billable metric.
     * @example "Storage"
     */
    name: string;
    /**
     * Unique code used to identify the billable metric associated with the API request. This code associates each event with the correct metric.
     * @example "storage"
     */
    code: string;
    /**
     * Internal description of the billable metric.
     * @example "GB of storage used in my application"
     */
    description?: string | null;
    /**
     * Defines if the billable metric is persisted billing period over billing period.
     *
     * - If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period.
     * - If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period.
     * - If not defined in the request, default value is `false`.
     * @example false
     */
    recurring: boolean;
    /**
     * Refers to the numeric value or mathematical expression that will be rounded based on the calculated number of billing units. Possible values are `round`, `ceil` and `floor`.
     * @example "round"
     */
    rounding_function?: "ceil" | "floor" | "round";
    /**
     * Specifies the number of decimal places to which the `rounding_function` will be rounded. It can be a positive or negative value.
     * @example 2
     */
    rounding_precision?: number | null;
    /**
     * Creation date of the billable metric.
     * @format date-time
     * @example "2022-09-14T16:35:31Z"
     */
    created_at: string;
    /**
     * Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units.
     * @example "round((ended_at - started_at) * units)"
     */
    expression?: string;
    /**
     * Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`.
     * @example "gb"
     */
    field_name?: string | null;
    /**
     * Aggregation method used to compute usage for this billable metric.
     * @example "sum_agg"
     */
    aggregation_type: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg" | "weighted_sum_agg" | "latest_agg";
    /**
     * Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`.
     * @example "seconds"
     */
    weighted_interval?: "seconds";
    filters?: BillableMetricFilterObject[];
}
export interface BillableMetricsPaginated {
    billable_metrics: BillableMetricObject[];
    meta: PaginationMeta;
}
/** Values used to apply differentiated pricing based on additional event properties. */
export interface BillableMetricFilterInput {
    /**
     * Filter key to add to the event properties payload
     * @example "region"
     */
    key: string;
    /** List of possible filter values */
    values: string[];
}
export interface BillableMetricBaseInput {
    /**
     * Name of the billable metric.
     * @example "Storage"
     */
    name?: string;
    /**
     * Unique code used to identify the billable metric associated with the API request. This code associates each event with the correct metric.
     * @example "storage"
     */
    code?: string;
    /**
     * Internal description of the billable metric.
     * @example "GB of storage used in my application"
     */
    description?: string | null;
    /**
     * Defines if the billable metric is persisted billing period over billing period.
     *
     * - If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period.
     * - If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period.
     * - If not defined in the request, default value is `false`.
     * @example false
     */
    recurring?: boolean;
    /**
     * Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units.
     * Accepted function are `ceil`, `concat` and `round` as well as `+`, `-`, `\` and `*` operations.
     * Round is accepting an optional second parameter to specify the number of decimal.
     * @example "round((ended_at - started_at) * units)"
     */
    expression?: string | null;
    /**
     * Refers to the numeric value or mathematical expression that will be rounded based on the calculated number of billing units. Possible values are `round`, `ceil` and `floor`.
     * @example "round"
     */
    rounding_function?: "ceil" | "floor" | "round";
    /**
     * Specifies the number of decimal places to which the `rounding_function` will be rounded. It can be a positive or negative value.
     * @example 2
     */
    rounding_precision?: number | null;
    /**
     * Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`.
     * @example "gb"
     */
    field_name?: string | null;
    /**
     * Aggregation method used to compute usage for this billable metric.
     * @example "sum_agg"
     */
    aggregation_type?: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg" | "weighted_sum_agg" | "latest_agg";
    /**
     * Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`.
     * @example "seconds"
     */
    weighted_interval?: "seconds";
    filters?: BillableMetricFilterInput[];
}
export interface BillableMetricCreateInput {
    billable_metric: BillableMetricBaseInput;
}
export interface BillableMetric {
    billable_metric: BillableMetricObject;
}
export interface BillableMetricEvaluateExpressionInput {
    /**
     * Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units.
     * Accepted function are `ceil`, `concat` and `round` as well as `+`, `-`, `\` and `*` operations.
     * Round is accepting an optional second parameter to specify the number of decimal.
     * @example "round((ended_at - started_at) * units)"
     */
    expression: string;
    event: {
        /**
         * The code that identifies a targeted billable metric.
         * @example "storage"
         */
        code: string;
        /**
         * This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC).
         * If this timestamp is not provided, the API will automatically set it to the time of event reception.
         * @example "1651240791"
         */
        timestamp?: number | string;
        /**
         * This field represents additional properties associated with the event. They can be used when evaluating the expression.
         * @example {"gb":10}
         */
        properties: Record<string, string | number>;
    };
}
export interface BillableMetricEvaluateExpressionResult {
    expression_result: {
        /**
         * Result of evaluating the expression
         * @example 1
         */
        value: string | number;
    };
}
export interface BillableMetricUpdateInput {
    billable_metric: BillableMetricBaseInput;
}
export interface FeaturePrivilegeObject {
    /**
     * Unique code for the privilege.
     * @example "max"
     */
    code: string;
    /**
     * Display name for the privilege.
     * @example "Maximum"
     */
    name: string | null;
    /**
     * Data type of the privilege value. Default: string
     * @example "integer"
     */
    value_type: "integer" | "boolean" | "string" | "select";
    config: {
        /**
         * Array of string, required only when value_type is `select`.
         * @example ["google","okta"]
         */
        select_options?: string[];
    };
}
export interface FeatureObject {
    /**
     * Unique code used to identify the feature. Max 255 characters.
     * @example "seats"
     */
    code: string;
    /**
     * Name of the feature. Max 255 characters.
     * @example "Number of seats"
     */
    name: string | null;
    /**
     * Description of the feature. Max 600 characters.
     * @example "Number of users of the account"
     */
    description: string | null;
    /**
     * Privileges associated with this feature. Can be empty.
     * @example [{"code":"max","name":"Maximum","value_type":"integer","config":{}},{"code":"max_admins","name":"Max Admins","value_type":"integer","config":{}},{"code":"root","name":"Allow root user","value_type":"boolean","config":{}},{"code":"provider","name":"SSO Provider","value_type":"select","config":{"select_options":["google","okta"]}}]
     */
    privileges: FeaturePrivilegeObject[];
    /**
     * Creation date of the feature.
     * @format date-time
     * @example "2025-07-17T12:34:35Z"
     */
    created_at: string;
}
export interface FeaturesPaginated {
    features: FeatureObject[];
    meta: PaginationMeta;
}
export interface FeatureBaseInput {
    /**
     * Name of the feature.
     * @example "Number of seats"
     */
    name?: string | null;
    /**
     * Internal description of the feature.
     * @example "Number of users of the account"
     */
    description?: string | null;
    /**
     * Privileges associated with this feature. Can be empty.
     * @example [{"code":"max","name":"Maximum","value_type":"integer"},{"code":"max_admins","name":"Max Admins","value_type":"integer"},{"code":"root","name":"Allow root user","value_type":"boolean"},{"code":"provider","name":"SSO Provider","value_type":"select","config":{"select_options":["google","okta"]}}]
     */
    privileges?: {
        /**
         * Unique code for the privilege.
         * @example "max"
         */
        code: string;
        /**
         * Display name for the privilege.
         * @example "Maximum"
         */
        name?: string | null;
        /**
         * Data type of the privilege value. Default: string
         * @example "integer"
         */
        value_type?: "integer" | "boolean" | "string" | "select";
        config?: {
            /**
             * Array of string, required only when value_type is `select`.
             * @example ["google","okta"]
             */
            select_options?: string[];
        };
    }[];
}
export interface FeatureCreateInput {
    feature: FeatureBaseInput & {
        /**
         * Unique code used to identify the feature.
         * @example "seats"
         */
        code: string;
    };
}
export interface Feature {
    feature: FeatureObject;
}
export interface FeatureUpdateInput {
    feature: FeatureBaseInput;
}
export interface CouponObject {
    /**
     * Unique identifier of the coupon, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The name of the coupon.
     * @example "Startup Deal"
     */
    name: string;
    /**
     * Unique code used to identify the coupon.
     * @example "startup_deal"
     */
    code: string;
    /**
     * Description of the coupon.
     * @example "I am a coupon description"
     */
    description?: string | null;
    /**
     * The type of the coupon. It can have two possible values: `fixed_amount` or `percentage`.
     *
     * - If set to `fixed_amount`, the coupon represents a fixed amount discount.
     * - If set to `percentage`, the coupon represents a percentage-based discount.
     * @example "fixed_amount"
     */
    coupon_type: "fixed_amount" | "percentage";
    /**
     * The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type.
     * @example 5000
     */
    amount_cents?: number | null;
    /**
     * The currency of the coupon. This field is required only for coupon with `fixed_amount` type.
     * @example "USD"
     */
    amount_currency?: CurrencyOrNull;
    /**
     * Indicates whether the coupon can be reused or not. If set to `true`, the coupon is reusable, meaning it can be applied multiple times to the same customer. If set to `false`, the coupon can only be used once and is not reusable. If not specified, this field is set to `true` by default.
     * @example true
     */
    reusable: boolean;
    /**
     * The coupon is limited to specific plans. The possible values can be `true` or `false`.
     * @example true
     */
    limited_plans: boolean;
    /**
     * An array of plan codes to which the coupon is applicable. By specifying the plan codes in this field, you can restrict the coupon's usage to specific plans only.
     * @example ["startup_plan"]
     */
    plan_codes?: string[];
    /**
     * The coupon is limited to specific billable metrics. The possible values can be `true` or `false`.
     * @example false
     */
    limited_billable_metrics: boolean;
    /**
     * An array of billable metric codes to which the coupon is applicable. By specifying the billable metric codes in this field, you can restrict the coupon's usage to specific metrics only.
     * @example []
     */
    billable_metric_codes?: string[];
    /**
     * The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example null
     */
    percentage_rate?: string | null;
    /**
     * The type of frequency for the coupon. It can have three possible values: `once`, `recurring`, or `forever`.
     *
     * - If set to `once`, the coupon is applicable only for a single use.
     * - If set to `recurring`, the coupon can be used multiple times for recurring billing periods.
     * - If set to `forever`, the coupon has unlimited usage and can be applied indefinitely.
     * @example "recurring"
     */
    frequency: "once" | "recurring" | "forever";
    /**
     * Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type
     * @example 6
     */
    frequency_duration?: number | null;
    /**
     * Specifies the type of expiration for the coupon. It can have two possible values: `time_limit` or `no_expiration`.
     *
     * - If set to `time_limit`, the coupon has an expiration based on a specified time limit.
     * - If set to `no_expiration`, the coupon does not have an expiration date and remains valid indefinitely.
     * @example "time_limit"
     */
    expiration: "no_expiration" | "time_limit";
    /**
     * The expiration date and time of the coupon. This field is required only for coupons with `expiration` set to `time_limit`. The expiration date and time should be specified in UTC format according to the ISO 8601 datetime standard. It indicates the exact moment when the coupon will expire and is no longer valid.
     * @format date-time
     * @example "2022-08-08T23:59:59Z"
     */
    expiration_at?: string | null;
    /**
     * The date and time when the coupon was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the coupon was initially created.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /**
     * This field indicates if the coupon has been terminated and is no longer usable. If it's not null, it won't be removed for existing customers using it, but it prevents the coupon from being applied in the future.
     * @format date-time
     * @example "2022-08-08T23:59:59Z"
     */
    terminated_at?: string | null;
}
export interface CouponsPaginated {
    coupons: CouponObject[];
    meta: PaginationMeta;
}
export interface CouponBaseInput {
    /**
     * The name of the coupon.
     * @example "Startup Deal"
     */
    name?: string;
    /**
     * Unique code used to identify the coupon.
     * @example "startup_deal"
     */
    code?: string;
    /**
     * Description of the coupon.
     * @example "I am a coupon description"
     */
    description?: string | null;
    /**
     * The type of the coupon. It can have two possible values: `fixed_amount` or `percentage`.
     *
     * - If set to `fixed_amount`, the coupon represents a fixed amount discount.
     * - If set to `percentage`, the coupon represents a percentage-based discount.
     * @example "fixed_amount"
     */
    coupon_type?: "fixed_amount" | "percentage";
    /**
     * The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type.
     * @example 5000
     */
    amount_cents?: number | null;
    /**
     * The currency of the coupon. This field is required only for coupon with `fixed_amount` type.
     * @example "USD"
     */
    amount_currency?: CurrencyOrNull;
    /**
     * Indicates whether the coupon can be reused or not. If set to `true`, the coupon is reusable, meaning it can be applied multiple times to the same customer. If set to `false`, the coupon can only be used once and is not reusable. If not specified, this field is set to `true` by default.
     * @example false
     */
    reusable?: boolean;
    /**
     * The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example null
     */
    percentage_rate?: string | null;
    /**
     * The type of frequency for the coupon. It can have three possible values: `once`, `recurring` or `forever`.
     *
     * - If set to `once`, the coupon is applicable only for a single use.
     * - If set to `recurring`, the coupon can be used multiple times for recurring billing periods.
     * - If set to `forever`, the coupon has unlimited usage and can be applied indefinitely.
     * @example "recurring"
     */
    frequency?: "once" | "recurring" | "forever";
    /**
     * Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type
     * @example 6
     */
    frequency_duration?: number | null;
    /**
     * Specifies the type of expiration for the coupon. It can have two possible values: `time_limit` or `no_expiration`.
     *
     * - If set to `time_limit`, the coupon has an expiration based on a specified time limit.
     * - If set to `no_expiration`, the coupon does not have an expiration date and remains valid indefinitely.
     * @example "time_limit"
     */
    expiration?: "no_expiration" | "time_limit";
    /**
     * The expiration date and time of the coupon. This field is required only for coupons with `expiration` set to `time_limit`. The expiration date and time should be specified in UTC format according to the ISO 8601 datetime standard. It indicates the exact moment when the coupon will expire and is no longer valid.
     * @format date-time
     * @example "2022-08-08T23:59:59Z"
     */
    expiration_at?: string | null;
    /** Set coupon limitations to plans or specific metrics. */
    applies_to?: {
        /**
         * An array of plan codes to which the coupon is applicable. By specifying the plan codes in this field, you can restrict the coupon's usage to specific plans only.
         * @example ["startup_plan"]
         */
        plan_codes?: any[] | null;
        /**
         * An array of billable metric codes to which the coupon is applicable. By specifying the billable metric codes in this field, you can restrict the coupon's usage to specific metrics only.
         * @example []
         */
        billable_metric_codes?: any[] | null;
    };
}
export interface CouponCreateInput {
    coupon: CouponBaseInput;
}
export interface Coupon {
    coupon: CouponObject;
}
export interface CouponUpdateInput {
    coupon: CouponBaseInput;
}
export interface FeeAmountDetails {
    /**
     * The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.
     * @example 10000
     */
    plan_amount_cents?: number;
    /** Graduated ranges, used for a `graduated` charge model. */
    graduated_ranges?: {
        /**
         * Total units received in Lago.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "10.0"
         */
        units: string;
        /**
         * Lower value of a tier. It is either 0 or the previous range's `to_value + 1`.
         * @example 0
         */
        from_value: number;
        /**
         * Highest value of a tier.
         * - This value is higher than the from_value of the same tier.
         * - This value is null for the last tier.
         * @example 10
         */
        to_value: number | null;
        /**
         * Flat unit amount within a specified tier.
         * @example "1.0"
         */
        flat_unit_amount: string;
        /**
         * Amount per unit within a specified tier.
         * @example "1.0"
         */
        per_unit_amount: string;
        /**
         * Total amount of received units to be charged within a specified tier.
         * @example "10.0"
         */
        per_unit_total_amount: string;
        /**
         * Total amount to be charged for a specific tier, taking into account the flat_unit_amount and the per_unit_total_amount.
         * @example "11.0"
         */
        total_with_flat_amount: string;
    }[];
    /** Graduated percentage ranges, used for a `graduated_percentage` charge model. */
    graduated_percentage_ranges?: {
        /**
         * Total units received in Lago.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "10.0"
         */
        units: string;
        /**
         * Lower value of a tier. It is either 0 or the previous range's `to_value + 1`.
         * @example 0
         */
        from_value: number;
        /**
         * Highest value of a tier.
         * - This value is higher than the from_value of the same tier.
         * - This value is null for the last tier.
         * @example 10
         */
        to_value: number | null;
        /**
         * Flat unit amount within a specified tier.
         * @example "1.0"
         */
        flat_unit_amount: string;
        /**
         * Percentage rate applied within a specified tier.
         * @format ^[0-9]+.?[0-9]*$
         * @example "1.0"
         */
        rate: string;
        /**
         * Total amount of received units to be charged within a specified tier.
         * @example "10.0"
         */
        per_unit_total_amount: string;
        /**
         * Total amount to be charged for a specific tier, taking into account the flat_unit_amount and the per_unit_total_amount.
         * @example "11.0"
         */
        total_with_flat_amount: string;
    }[];
    /**
     * The quantity of units that are provided free of charge for each billing period in a `package` charge model.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "10.0"
     */
    free_units?: string;
    /**
     * The quantity of units that are not provided free of charge for each billing period in a `package` charge model.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "40.0"
     */
    paid_units?: string;
    /**
     * The quantity of units included, defined for Package or Percentage charge model.
     * @example 1000
     */
    per_package_size?: number;
    /**
     * Total amount to charge for received paid_units, defined for Package or Percentage charge model.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "0.5"
     */
    per_package_unit_amount?: string;
    /**
     * Total amount of received units to be charged for the Volume or Percentage charge model.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "10.0"
     */
    per_unit_total_amount?: string;
    /**
     * The total units received in Lago for the Percentage charge model.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "20.0"
     */
    units?: string;
    /**
     * Total number of free events allowed for the Percentage charge model.
     * @example 10
     */
    free_events?: number;
    /**
     * Percentage rate applied for the Percentage charge model.
     * @format ^[0-9]+.?[0-9]*$
     * @example "1.0"
     */
    rate?: string;
    /**
     * Total number of paid events for the Percentage charge model.
     * @example 20
     */
    paid_events?: number;
    /**
     * Fixed fee unit price per received paid_event for the Percentage charge model.
     * @example "1.0"
     */
    fixed_fee_unit_amount?: string;
    /**
     * Total amount to charge for received paid_events for the Percentage charge model.
     * @example "20.0"
     */
    fixed_fee_total_amount?: string;
    /**
     * Total adjustment amount linked to minimum and maximum spending per transaction for the Percentage charge model.
     * @example "20.0"
     */
    min_max_adjustment_total_amount?: string;
    /**
     * The flat amount for a whole tier, excluding tax, for a `volume` charge model.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "0.5"
     */
    per_unit_amount?: string;
    /**
     * The unit price, excluding tax, for a specific tier of a `volume` charge model.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "10.0"
     */
    flat_unit_amount?: string;
}
export interface BaseAppliedTax {
    /**
     * Unique identifier of the applied tax, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Unique identifier of the tax, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_tax_id: string | null;
    /**
     * Name of the tax.
     * @example "TVA"
     */
    tax_name: string;
    /**
     * Unique code used to identify the tax associated with the API request.
     * @example "french_standard_vat"
     */
    tax_code: string;
    /**
     * The percentage rate of the tax
     * @example 20
     */
    tax_rate: number;
    /**
     * Internal description of the tax
     * @example "French standard VAT"
     */
    tax_description: string | null;
    /**
     * Amount of the tax
     * @example 2000
     */
    amount_cents: number;
    /**
     * Currency of the tax
     * @example "USD"
     */
    amount_currency: Currency;
    /**
     * The date and time when the applied tax was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the applied tax was initially created.
     * @format date-time
     * @example "2022-09-14T16:35:31Z"
     */
    created_at: string;
}
export type FeeAppliedTaxObject = BaseAppliedTax & {
    /**
     * Unique identifier of the fee, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_fee_id?: string;
};
export interface PricingUnitDetailsObject {
    /**
     * Unique identifier of the pricing unit, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_pricing_unit_id: string;
    /**
     * The code of the pricing unit.
     * @example "credits"
     */
    pricing_unit_code: string;
    /**
     * The short name of the pricing unit. Will be used as currency name in the UI and PDFs.
     * @example "CR"
     */
    short_name: string;
    /**
     * The amount in cents in the pricing unit.
     * @example 200
     */
    amount_cents: number;
    /**
     * The precise amount in cents in the pricing unit.
     * @example "200.0"
     */
    precise_amount_cents: string;
    /**
     * The unit amount in cents in the pricing unit.
     * @example 100
     */
    unit_amount_cents: number;
    /**
     * The precise unit amount in the pricing unit.
     * @example "100.0"
     */
    precise_unit_amount: string;
    /**
     * The conversion rate from pricing units to the plan's currency.
     * @example "0.5"
     */
    conversion_rate: string;
}
export interface FeeObject {
    /**
     * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id?: string | null;
    /**
     * Unique identifier assigned to the charge that the fee belongs to
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_charge_id?: string | null;
    /**
     * Unique identifier assigned to the charge filter that the fee belongs to
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_charge_filter_id?: string | null;
    /**
     * Unique identifier assigned to the fixed charge that the fee belongs to
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_fixed_charge_id?: string | null;
    /**
     * Unique identifier assigned to the invoice that the fee belongs to
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_invoice_id?: string | null;
    /**
     * Unique identifier assigned to the true-up fee when a minimum has been set to the charge. This identifier helps to distinguish and manage the true-up fee associated with the charge, which may be applicable when a minimum threshold or limit is set for the charge amount.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_true_up_fee_id?: string | null;
    /**
     * Unique identifier assigned to the parent fee on which the true-up fee is assigned. This identifier establishes the relationship between the parent fee and the associated true-up fee.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_true_up_parent_fee_id?: string | null;
    /**
     * Unique identifier assigned to the subscription, created by Lago. This field is specifically displayed when the fee type is charge or subscription.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_subscription_id?: string | null;
    /**
     * Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge or subscription.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id?: string | null;
    /**
     * Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge or subscription.
     * @example "external_id"
     */
    external_customer_id?: string | null;
    /**
     * Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge or subscription.
     * @example "external_id"
     */
    external_subscription_id?: string | null;
    /**
     * The cost of this specific fee, excluding any applicable taxes.
     * @example 100
     */
    amount_cents: number;
    /**
     * The cost of this specific fee, excluding any applicable taxes, with precision.
     * @example "1.0001"
     */
    precise_amount?: string;
    /**
     * The cost of this specific fee, including any applicable taxes, with precision.
     * @example "1.0212"
     */
    precise_total_amount?: string;
    /**
     * The currency of this specific fee. It indicates the monetary unit in which the fee's cost is expressed.
     * @example "EUR"
     */
    amount_currency: Currency;
    /**
     * The cost of the tax associated with this specific fee.
     * @example 20
     */
    taxes_amount_cents: number;
    /**
     * The cost of the tax associated with this specific fee, with precision.
     * @example "0.20123"
     */
    taxes_precise_amount?: string;
    /**
     * The tax rate associated with this specific fee.
     * @example 20
     */
    taxes_rate: number;
    /**
     * The number of units used to charge the customer. This field indicates the quantity or count of units consumed or utilized in the context of the charge. It helps in determining the basis for calculating the fee or cost associated with the usage of the service or product provided to the customer.
     * @example "0.32"
     */
    units: string;
    /**
     * The unit amount of the fee per unit, with precision.
     * @example "312.5"
     */
    precise_unit_amount: string;
    /**
     * The total number of units that have been aggregated for this specific fee.
     * @example "0.32"
     */
    total_aggregated_units: string;
    /**
     * The cost of this specific fee, including any applicable taxes.
     * @example 120
     */
    total_amount_cents: number;
    /**
     * The currency of this specific fee, including any applicable taxes.
     * @example "EUR"
     */
    total_amount_currency: Currency;
    /**
     * The number of events that have been sent and used to charge the customer. This field indicates the count or quantity of events that have been processed and considered in the charging process.
     * @example 23
     */
    events_count?: number | null;
    /**
     * Flag that indicates whether the fee was paid in advance. It serves as a boolean value, where `true` represents that the fee was paid in advance (straightaway), and `false` indicates that the fee was not paid in arrears (at the end of the period).
     * @example true
     */
    pay_in_advance: boolean;
    /**
     * Flag that indicates whether the fee was included on the invoice. It serves as a boolean value, where `true` represents that the fee was included on the invoice, and `false` indicates that the fee was not included on the invoice.
     * @example true
     */
    invoiceable: boolean;
    /**
     * The beginning date of the period that the fee covers. It is applicable only to `subscription`, `charge`, `fixed_charge` and `commitment` fees. This field indicates the start date of the billing period or subscription period associated with the fee.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    from_date?: string | null;
    /**
     * The ending date of the period that the fee covers. It is applicable only to `subscription`, `charge`, `fixed_charge` and `commitment` fees. This field indicates the end date of the billing period or subscription period associated with the fee.
     * @format date-time
     * @example "2022-05-29T08:59:51Z"
     */
    to_date?: string | null;
    /**
     * Indicates the payment status of the fee. It represents the current status of the payment associated with the fee. The possible values for this field are `pending`, `succeeded`, `failed` and `refunded`.
     * @example "pending"
     */
    payment_status: "pending" | "succeeded" | "failed" | "refunded";
    /**
     * The date and time when the fee was created. It is provided in Coordinated Universal Time (UTC) format.
     * @format date-time
     * @example "2022-08-24T14:58:59Z"
     */
    created_at?: string | null;
    /**
     * The date and time when the payment for the fee was successfully processed. It is provided in Coordinated Universal Time (UTC) format.
     * @format date-time
     * @example "2022-08-24T14:58:59Z"
     */
    succeeded_at?: string | null;
    /**
     * The date and time when the payment for the fee failed to process. It is provided in Coordinated Universal Time (UTC) format.
     * @format date-time
     * @example "2022-08-24T14:58:59Z"
     */
    failed_at?: string | null;
    /**
     * The date and time when the payment for the fee was refunded. It is provided in Coordinated Universal Time (UTC) format
     * @format date-time
     * @example "2022-08-24T14:58:59Z"
     */
    refunded_at?: string | null;
    /**
     * Unique identifier assigned to the transaction. This field is specifically displayed when the fee type is `charge` and the payment for the fee is made in advance (`pay_in_advance` is set to `true`).
     * @example "transaction_1234567890"
     */
    event_transaction_id?: string | null;
    /**
     * The description of the fee.
     * @example "Fee description"
     */
    description?: string | null;
    /**
     * The coupon amount applied to the fee, with precision.
     * @example "0.0"
     */
    precise_coupons_amount_cents?: string;
    /**
     * The sub total of the fee excluding taxes, in cents.
     * @example 100
     */
    sub_total_excluding_taxes_amount_cents: number;
    /**
     * The sub total of the fee excluding taxes, with precision.
     * @example "100.0"
     */
    sub_total_excluding_taxes_precise_amount_cents: string;
    /** List of all unit amount details for calculating the fee. */
    amount_details?: FeeAmountDetails;
    /**
     * Indicates if the fee belongs to self-billed invoice. Self-billing is a process where an organization creates the invoice on behalf of the partner.
     * @example false
     */
    self_billed?: boolean;
    /** Item attached to the fee */
    item: {
        /**
         * The fee type. Possible values are `add-on`, `charge`, `fixed_charge`, `credit`, `subscription` or `commitment`.
         * @example "subscription"
         */
        type: "charge" | "fixed_charge" | "add_on" | "subscription" | "credit" | "commitment";
        /**
         * The code of the fee item. It can be the code of the `add-on`, the code of the `charge`, the code of the `fixed_charge`, the code of the `credit` or the code of the `subscription`.
         * @example "startup"
         */
        code: string;
        /**
         * The name of the fee item. The value depends on the type of the fee item:
         *
         * - If the fee item is a `charge`, it is the billable metric name.
         * - If the fee item is a `add-on`, it is the add-on name.
         * - If the fee item is a `credit`, it is the wallet transaction name if set, or `"credit"` if not.
         * - If the fee item is a `fixed_charge`, it is the fixed charge add-on name.
         * - For all the other fee items, it is the subscription plan name.
         * @example "Startup"
         */
        name: string;
        /**
         * The description of the fee item. The value depends on the type of the fee item:
         *
         * - If the fee item is a `charge`, it is the billable metric description.
         * - If the fee item is a `add-on`, it is the add-on description.
         * - If the fee item is a `credit`, it is always `"credit"`.
         * - If the fee item is a `fixed_charge`, it is the fixed charge add-on description.
         * - For all the other fee items, it is the subscription plan description.
         * @example "Startup"
         */
        description?: string | null;
        /**
         * Specifies the name that will be displayed on an invoice. If no value is set for this field, we'll fallback to a value that depends on the type of the fee items:
         *
         * - If the fee item is a `charge`, we'll fallback to the `invoice_display_name` of the `charge` or the billable metric name if no `invoice_display_name` is set.
         * - If the fee item is a `add-on`, we'll fallback to the `invoice_name` of the `add-on` or the `name` of the `add-on`.
         * - If the fee item is a `credit`, we'll fallback to the wallet transaction name if set, or `credit` if not.
         * - If the fee item is a `fixed_charge`, we'll fallback to the `invoice_display_name` of the `fixed_charge` or the `invoice_name` of the `fixed_charge_add_on` if no `invoice_display_name` is set.
         * - For all the other fee items, we'll fallback to the `invoice_display_name` of the subscription plan.
         * @example "Setup Fee (SF1)"
         */
        invoice_display_name?: string;
        /**
         * Specifies the name that will be displayed on an invoice. If no value is set for this field, the actual charge filter values will be used as the default display name.
         * @example "AWS eu-east-1"
         */
        filter_invoice_display_name?: string | null;
        /** Key value list of event properties */
        filters?: object | null;
        /**
         * Unique identifier of the fee item, created by Lago. It can be the identifier of the `add-on`, the `charge`, the `credit`, the `subscription` or the `commitment`.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_item_id: string;
        /**
         * The type of the fee item. Possible values are `AddOn`, `BillableMetric`, `WalletTransaction`, `Subscription`.
         * @example "Subscription"
         */
        item_type: "AddOn" | "BillableMetric" | "Subscription" | "WalletTransaction";
        /** Key value list of event properties aggregated by the charge model */
        grouped_by?: Record<string, string>;
    };
    /** List of fee applied taxes */
    applied_taxes?: FeeAppliedTaxObject[];
    /** Details about the pricing unit used and amounts for this fee. */
    pricing_unit_details?: object | null;
}
export interface CreditNoteItemObject {
    /**
     * The credit note's item unique identifier, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The credit note's item amount, expressed in cents.
     * @example 100
     */
    amount_cents: number;
    /**
     * The credit note's item currency.
     * @example "EUR"
     */
    amount_currency: Currency;
    /** The fee object related to the credit note item. */
    fee: FeeObject;
}
export type CreditNoteAppliedTaxObject = BaseAppliedTax & {
    /**
     * Unique identifier of the credit note, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_credit_note_id?: string;
    /** @example 100 */
    base_amount_cents?: number;
};
/** @example "US" */
export type CountryOrNull = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
/** @example "America/Los_Angeles" */
export type TimezoneOrNull = "UTC" | "Africa/Algiers" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Monrovia" | "Africa/Nairobi" | "America/Argentina/Buenos_Aires" | "America/Bogota" | "America/Caracas" | "America/Chicago" | "America/Chihuahua" | "America/Denver" | "America/Godthab" | "America/Guatemala" | "America/Guyana" | "America/Halifax" | "America/Indiana/Indianapolis" | "America/Juneau" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Mazatlan" | "America/Mexico_City" | "America/Monterrey" | "America/Montevideo" | "America/New_York" | "America/Phoenix" | "America/Puerto_Rico" | "America/Regina" | "America/Santiago" | "America/Sao_Paulo" | "America/St_Johns" | "America/Tijuana" | "Asia/Almaty" | "Asia/Baghdad" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Chongqing" | "Asia/Colombo" | "Asia/Dhaka" | "Asia/Hong_Kong" | "Asia/Irkutsk" | "Asia/Jakarta" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kathmandu" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuwait" | "Asia/Magadan" | "Asia/Muscat" | "Asia/Novosibirsk" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tokyo" | "Asia/Ulaanbaatar" | "Asia/Urumqi" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Cape_Verde" | "Atlantic/South_Georgia" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Darwin" | "Australia/Hobart" | "Australia/Melbourne" | "Australia/Perth" | "Australia/Sydney" | "Europe/Amsterdam" | "Europe/Athens" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Helsinki" | "Europe/Istanbul" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Madrid" | "Europe/Minsk" | "Europe/Moscow" | "Europe/Paris" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/Sarajevo" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "GMT+12" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Chatham" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Majuro" | "Pacific/Midway" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Port_Moresby" | "Pacific/Tongatapu";
/** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
export interface CustomerBillingConfiguration {
    /**
     * The grace period, expressed in days, for the invoice. This period refers to the additional time granted to the customer beyond the invoice due date to adjust usage and line items
     * @example 3
     */
    invoice_grace_period?: number;
    /**
     * Defines whether the issuing date follows the current billing period's end date or the next period starting date.
     * @default null
     * @example "next_period_start"
     */
    subscription_invoice_issuing_date_anchor?: "current_period_end" | "next_period_start";
    /**
     * The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.
     * @default null
     * @example "keep_anchor"
     */
    subscription_invoice_issuing_date_adjustment?: "align_with_finalization_date" | "keep_anchor";
    /**
     * The payment provider utilized to initiate payments for invoices issued by Lago.
     * Accepted values: `stripe`, `adyen`, `gocardless` or null. This field is required if you intend to assign a `provider_customer_id`.
     * @example "stripe"
     */
    payment_provider?: "stripe" | "adyen" | "gocardless";
    /**
     * Unique code used to identify a payment provider connection.
     * @example "stripe-eu-1"
     */
    payment_provider_code?: string;
    /**
     * The customer ID within the payment provider's system. If this field is not provided, Lago has the option to create a new customer record within the payment provider's system on behalf of the customer
     * @example "cus_12345"
     */
    provider_customer_id?: string;
    /**
     * Set this field to `true` if you want to create the customer in the payment provider synchronously with the customer creation process in Lago. This option is applicable only when the `provider_customer_id` is `null` and the customer is automatically created in the payment provider through Lago. By default, the value is set to `false`
     * @example true
     */
    sync?: boolean;
    /**
     * Set this field to `true` if you want to create a customer record in the payment provider's system. This option is applicable only when the `provider_customer_id` is null and the `sync_with_provider` field is set to `true`. By default, the value is set to `false`
     * @example true
     */
    sync_with_provider?: boolean;
    /**
     * The document locale, specified in the ISO 639-1 format. This field represents the language or locale used for the documents issued by Lago
     * @example "fr"
     */
    document_locale?: string;
    /**
     * Specifies the available payment methods that can be used for this customer when `payment_provider` is set to `stripe`. The `provider_payment_methods` field is an array that allows multiple payment options to be defined. If this field is not explicitly set, the payment methods will be set to `card`. For now, possible values are `card`, `sepa_debit`, `us_bank_account`, `bacs_debit`, `boleto`, `link`, `crypto` and `customer_balance`. Note that when `link` is selected, `card` should also be provided in the array. When `customer_balance` is selected, no other payment can be selected.
     * @example ["card","sepa_debit","us_bank_account","bacs_debit","link","boleto","crypto","customer_balance"]
     */
    provider_payment_methods?: any[] | null;
}
/** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
export interface Address {
    /**
     * The first line of the billing address
     * @example "5230 Penfield Ave"
     */
    address_line1?: string | null;
    /**
     * The second line of the billing address
     * @example null
     */
    address_line2?: string | null;
    /**
     * The city of the customer's billing address
     * @example "Woodland Hills"
     */
    city?: string | null;
    /**
     * Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
     * @example "US"
     */
    country?: CountryOrNull;
    /**
     * The state of the customer's billing address
     * @example "CA"
     */
    state?: string | null;
    /**
     * The zipcode of the customer's billing address
     * @example "91364"
     */
    zipcode?: string | null;
}
/** Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format */
export interface CustomerMetadata {
    /**
     * A unique identifier for the customer metadata object in the Lago application. Can be used to update a key-value pair
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The metadata object key
     * @example "Purchase Order"
     */
    key: string;
    /**
     * The metadata object value
     * @example "123456789"
     */
    value: string;
    /**
     * Determines whether the item or information should be displayed in the invoice. If set to true, the item or information will be included and visible in the generated invoice. If set to false, the item or information will be excluded and not displayed in the invoice.
     * @example true
     */
    display_in_invoice: boolean;
    /**
     * The date of the metadata object creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the metadata object was created
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
}
export interface CustomerBaseObject {
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The unique identifier assigned to the customer within the organization's scope. This identifier is used to track and reference the customer's order of creation within the organization's system. It ensures that each customer has a distinct `sequential_id`` associated with them, allowing for easy identification and sorting based on the order of creation
     * @example 1
     */
    sequential_id: number;
    /**
     * A concise and unique identifier for the customer, formed by combining the Organization's `name`, `id`, and customer's `sequential_id`
     * @example "LAG-1234-001"
     */
    slug: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_id: string;
    /**
     * The unique code of the billing entity associated with the customer.
     * @example "acme_corp"
     */
    billing_entity_code?: string;
    /**
     * The first line of the billing address
     * @example "5230 Penfield Ave"
     */
    address_line1?: string | null;
    /**
     * The second line of the billing address
     * @example null
     */
    address_line2?: string | null;
    /** The customer's applicable timezone, used for billing purposes in their local time. */
    applicable_timezone: Timezone;
    /**
     * The city of the customer's billing address
     * @example "Woodland Hills"
     */
    city?: string | null;
    /**
     * Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
     * @example "US"
     */
    country?: CountryOrNull;
    /**
     * Currency of the customer. Format must be ISO 4217
     * @example "USD"
     */
    currency?: CurrencyOrNull;
    /**
     * The email of the customer
     * @format email
     * @example "dinesh@piedpiper.test"
     */
    email?: string | null;
    /**
     * The legal company name of the customer
     * @example "Coleman-Blair"
     */
    legal_name?: string | null;
    /**
     * The legal company number of the customer
     * @example "49-008-2965"
     */
    legal_number?: string | null;
    /**
     * The logo URL of the customer
     * @example "http://hooli.com/logo.png"
     */
    logo_url?: string | null;
    /**
     * The full name of the customer
     * @example "Gavin Belson"
     */
    name?: string | null;
    /**
     * First name of the customer
     * @example "Gavin"
     */
    firstname?: string | null;
    /**
     * Last name of the customer
     * @example "Belson"
     */
    lastname?: string | null;
    /**
     * The type of the account. It can have one of the following values:
     * - `customer`: the account is a customer.
     * - `partner`: the account is a partner.
     * @example "customer"
     */
    account_type?: "customer" | "partner";
    /**
     * The type of the customer. It can have one of the following values:
     * - `company`: the customer is a company.
     * - `individual`: the customer is an individual.
     */
    customer_type?: "company" | "individual";
    /**
     * The phone number of the customer
     * @example "1-171-883-3711 x245"
     */
    phone?: string | null;
    /**
     * The state of the customer's billing address
     * @example "CA"
     */
    state?: string | null;
    /**
     * The tax identification number of the customer
     * @example "EU123456789"
     */
    tax_identification_number?: string | null;
    /** The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone */
    timezone?: TimezoneOrNull;
    /**
     * The custom website URL of the customer
     * @example "http://hooli.com"
     */
    url?: string | null;
    /**
     * The zipcode of the customer's billing address
     * @example "91364"
     */
    zipcode?: string | null;
    /**
     * The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
     * @example 30
     */
    net_payment_term?: number | null;
    /**
     * The date of the customer creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the customer object was created
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /**
     * The date of the customer update, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The update_date provides a standardized and internationally recognized timestamp for when the customer object was updated
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    updated_at?: string;
    /**
     * Specifies how invoices with a zero total amount should be handled:
     * - `inherit`: (Default) Follows the organization-level configuration.
     * - `finalize`: Invoices are issued and finalized even if the total amount is zero.
     * - `skip`: Invoices with a total amount of zero are not finalized.
     * @example "inherit"
     */
    finalize_zero_amount_invoice?: "inherit" | "skip" | "finalize";
    /**
     * Set to true to exclude all invoice custom sections from PDF generation for this customer only.
     * @example false
     */
    skip_invoice_custom_sections?: boolean;
    /** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
    billing_configuration?: CustomerBillingConfiguration;
    /** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
    shipping_address?: Address;
    metadata?: CustomerMetadata[];
}
/**
 * Custom metadata stored as key-value pairs.
 * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
 * @example {"external_id":"ext-123","synced_at":"2024-01-15","source":null}
 */
export type MetadataObject = object | null;
export interface CreditNoteErrorDetailsObject {
    /**
     * The credit note error details unique identifier, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The type of the error.
     * @example "tax_error"
     */
    error_code: "not_provided" | "tax_error" | "tax_voiding_error" | "invoice_generation_error";
    /** The details of the error. */
    details: object;
}
export interface CreditNoteObject {
    /**
     * The credit note unique identifier, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The unique code of the billing entity associated with the credit note.
     * @example "acme_corp"
     */
    billing_entity_code: string;
    /**
     * The sequential identifier of the credit note, specifically scoped on the associated invoice. It provides a unique numerical identifier for the credit note within the context of the invoice.
     * @example 2
     */
    sequential_id: number;
    /**
     * The credit note unique number.
     * @example "LAG-1234-CN2"
     */
    number: string;
    /**
     * Unique identifier assigned to the invoice that the credit note belongs to
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_invoice_id: string;
    /**
     * The invoice unique number, related to the credit note.
     * @example "LAG-1234"
     */
    invoice_number: string;
    /**
     * The date of creation of the credit note. It follows the ISO 8601 date format and provides the specific date when the credit note was created.
     * @format date
     * @example "2022-12-06"
     */
    issuing_date: string;
    /**
     * The status of the credit portion of the credit note. It indicates the current state or condition of the credit amount associated with the credit note. The possible values for this field are:
     *
     * - `available`: this status indicates that an amount remains available for future usage. The credit can be applied towards future transactions or invoices.
     * - `consumed`: this status indicates that the credit amount has been fully consumed. The remaining amount is 0, indicating that the credit has been utilized in its entirety.
     * - `voided`: this status indicates that the remaining amount of the credit cannot be used any further. The credit has been voided and is no longer available for application or redemption.
     * @example "available"
     */
    credit_status?: "available" | "consumed" | "voided";
    /**
     * The status of the refund portion of the credit note. It indicates the current state or condition of the refund associated with the credit note. The possible values for this field are:
     *
     * - `pending`: this status indicates that the refund is pending execution. The refund request has been initiated but has not been processed or completed yet.
     * - `succeeded`: this status indicates that the refund has been successfully executed. The refund amount has been processed and returned to the customer or the designated recipient.
     * - `failed`: this status indicates that the refund failed to execute. The refund request encountered an error or unsuccessful processing, and the refund amount could not be returned.
     * @example "pending"
     */
    refund_status?: "pending" | "succeeded" | "failed";
    /**
     * The reason of the credit note creation.
     * Possible values are `duplicated_charge`, `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge` or `other`.
     * @example "other"
     */
    reason: "duplicated_charge" | "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "other";
    /**
     * The description of the credit note.
     * @example "Free text"
     */
    description?: string | null;
    /**
     * The currency of the credit note.
     * @example "EUR"
     */
    currency: Currency;
    /**
     * The total amount of the credit note, expressed in cents.
     * @example 120
     */
    total_amount_cents: number;
    /**
     * The tax amount of the credit note, expressed in cents.
     * @example 20
     */
    taxes_amount_cents: number;
    /**
     * The tax rate associated with this specific credit note.
     * @example 20
     */
    taxes_rate: number;
    /**
     * The subtotal of the credit note excluding any applicable taxes, expressed in cents.
     * @example 100
     */
    sub_total_excluding_taxes_amount_cents: number;
    /**
     * The remaining credit note amount, expressed in cents.
     * @example 100
     */
    balance_amount_cents: number;
    /**
     * The credited amount of the credit note, expressed in cents.
     * @example 100
     */
    credit_amount_cents: number;
    /**
     * The refunded amount of the credit note, expressed in cents.
     * @example 0
     */
    refund_amount_cents: number;
    /**
     * The ofsetted amount (deducted from the invoice balance) of the credit note, expressed in cents.
     * @example 0
     */
    offset_amount_cents: number;
    /**
     * The pro-rated amount of the coupons applied to the source invoice.
     * @example 20
     */
    coupons_adjustment_amount_cents: number;
    /**
     * The date when the credit note was created. It is expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-09-14T16:35:31Z"
     */
    created_at: string;
    /**
     * The date when the credit note was last updated. It is expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-09-14T16:35:31Z"
     */
    updated_at: string;
    /**
     * The PDF file of the credit note.
     * @example "https://getlago.com/credit_note/file"
     */
    file_url?: string | null;
    /** Array of credit note's items. */
    items?: CreditNoteItemObject[];
    applied_taxes?: CreditNoteAppliedTaxObject[];
    /**
     * Indicates if the credit note belongs to self-billed invoice. Self-billing is a process where an organization creates the invoice on behalf of the partner.
     * @example false
     */
    self_billed?: boolean;
    customer?: CustomerBaseObject;
    /**
     * Custom metadata stored as key-value pairs.
     * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
     */
    metadata?: MetadataObject;
    error_details?: any[] | null;
}
export interface CreditNotesPaginated {
    credit_notes: CreditNoteObject[];
    meta: PaginationMeta;
}
/**
 * Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
 * @example {"external_id":"ext-123","synced_at":"2024-01-15"}
 */
export type MetadataInput = Record<string, string | null>;
export interface CreditNoteCreateInput {
    credit_note: {
        /**
         * The invoice unique identifier, created by Lago.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        invoice_id: string;
        /**
         * The reason of the credit note creation.
         * Possible values are `duplicated_charge`, `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge` or `other`.
         * @example "duplicated_charge"
         */
        reason?: "duplicated_charge" | "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "other";
        /**
         * The description of the credit note.
         * @example "description"
         */
        description?: string;
        /**
         * The total amount to be credited to the customer balance for discounts on future invoices. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
         * @example 100
         */
        credit_amount_cents?: number | null;
        /**
         * The total amount to be refunded immediately to the payment method used by the customer. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
         * @example 500
         */
        refund_amount_cents?: number | null;
        /**
         * The total amount to be immediately deducted from the invoice balance. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
         * @example 200
         */
        offset_amount_cents?: number | null;
        /**
         * The list of credit note's items.
         * @example [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":100},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","amount_cents":500},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","amount_cents":200}]
         */
        items: {
            /**
             * The fee unique identifier, created by Lago.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            fee_id: string;
            /**
             * This is the amount of the credit note item excluding taxes, expressed in cents.
             * @example 100
             */
            amount_cents: number;
        }[];
        /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
        metadata?: MetadataInput;
    };
}
export type CreditNoteExtendedObject = CreditNoteObject & {
    customer?: CustomerBaseObject;
};
export interface CreditNoteExtended {
    credit_note: CreditNoteExtendedObject;
}
export interface CreditNoteUpdateInput {
    credit_note: {
        /**
         * The status of the refund portion of the credit note. It indicates the current state or condition of the refund associated with the credit note. The possible values for this field are:
         *
         * - `pending`: this status indicates that the refund is pending execution. The refund request has been initiated but has not been processed or completed yet.
         * - `succeeded`: this status indicates that the refund has been successfully executed. The refund amount has been processed and returned to the customer or the designated recipient.
         * - `failed`: this status indicates that the refund failed to execute. The refund request encountered an error or unsuccessful processing, and the refund amount could not be returned.
         * @example "succeeded"
         */
        refund_status: "pending" | "succeeded" | "failed";
        /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
        metadata?: MetadataInput;
    };
}
export interface CreditNote {
    credit_note: CreditNoteObject;
}
export interface CreditNoteEstimateInput {
    credit_note: {
        /**
         * The invoice unique identifier, created by Lago.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        invoice_id: string;
        /**
         * The list of credit note's items.
         * @example [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":10},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","amount_cents":5}]
         */
        items: {
            /**
             * The fee unique identifier, created by Lago.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            fee_id: string;
            /**
             * The amount of the credit note item, expressed in cents.
             * @example 10
             */
            amount_cents: number;
        }[];
    };
}
export interface CreditNoteEstimated {
    estimated_credit_note: {
        /**
         * Unique identifier assigned to the invoice that the credit note belongs to
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_invoice_id: string;
        /**
         * The invoice unique number, related to the credit note.
         * @example "LAG-1234"
         */
        invoice_number: string;
        /**
         * The currency of the credit note.
         * @example "EUR"
         */
        currency: Currency;
        /**
         * The tax amount of the credit note, expressed in cents.
         * @example 20
         */
        taxes_amount_cents: number;
        /**
         * The precise tax amount of the credit note, expressed in cents with decimal precision.
         * @example 20.1
         */
        precise_taxes_amount_cents: number;
        /**
         * The tax rate associated with this specific credit note.
         * @example 20
         */
        taxes_rate: number;
        /**
         * The subtotal of the credit note excluding any applicable taxes, expressed in cents.
         * @example 100
         */
        sub_total_excluding_taxes_amount_cents: number;
        /**
         * The credited amount of the credit note, expressed in cents.
         * @example 100
         */
        max_creditable_amount_cents: number;
        /**
         * The refunded amount of the credit note, expressed in cents.
         * @example 0
         */
        max_refundable_amount_cents: number;
        /**
         * The ofsetted amount of the credit note, expressed in cents.
         * @example 0
         */
        max_offsettable_amount_cents: number;
        /**
         * The pro-rated amount of the coupons applied to the source invoice.
         * @example 20
         */
        coupons_adjustment_amount_cents: number;
        /**
         * The precise pro-rated amount with decimal precision of the coupons applied to the source invoice.
         * @example 20.1
         */
        precise_coupons_adjustment_amount_cents: number;
        /** Array of credit note's items. */
        items: {
            /**
             * The credit note's item amount, expressed in cents.
             * @example 100
             */
            amount_cents: number;
            /**
             * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            lago_fee_id: string | null;
        }[];
        applied_taxes?: {
            /**
             * Unique identifier of the tax, created by Lago.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            lago_tax_id?: string;
            /**
             * Name of the tax.
             * @example "TVA"
             */
            tax_name?: string;
            /**
             * Unique code used to identify the tax associated with the API request.
             * @example "french_standard_vat"
             */
            tax_code?: string;
            /**
             * The percentage rate of the tax
             * @example 20
             */
            tax_rate?: number;
            /**
             * Internal description of the taxe
             * @example "French standard VAT"
             */
            tax_description?: string;
            /** @example 100 */
            base_amount_cents?: number;
            /**
             * Amount of the tax
             * @example 2000
             */
            amount_cents?: number;
            /**
             * Currency of the tax
             * @example "USD"
             */
            amount_currency?: Currency;
        }[];
    };
}
export interface ApiErrorNotAllowed {
    /**
     * @format int32
     * @example 405
     */
    status: number;
    /** @example "Method Not Allowed" */
    error: string;
    /** @example "not_allowed" */
    code: string;
}
export interface CreditNoteMetadataResponse {
    /**
     * Custom metadata stored as key-value pairs.
     * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
     */
    metadata: MetadataObject;
}
/** Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. */
export interface IntegrationCustomer {
    /**
     * A unique identifier for the integration customer object in the Lago application.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The integration type used for accounting and tax syncs.
     * Accepted values: `netsuite, anrok`.
     * @example "netsuite"
     */
    type: "netsuite" | "anrok" | "xero" | "hubspot" | "salesforce";
    /**
     * Unique code used to identify an integration connection.
     * @example "netsuite-eu-1"
     */
    integration_code: string;
    /**
     * The customer ID within the integration's system. If this field is not provided, Lago has the option to create a new customer record within the integration's system on behalf of the customer.
     * @example "cus_12345"
     */
    external_customer_id: string;
    /**
     * Set this field to `true` if you want to create a customer record in the integration's system. This option is applicable only when the `external_customer_id` is null and the `sync_with_provider` field is set to `true`. By default, the value is set to `false`
     * @example true
     */
    sync_with_provider?: boolean | null;
    /**
     * This optional field is needed only when working with `netsuite` connection.
     * @example "2"
     */
    subsidiary_id?: string;
    /**
     * This optional field is present only when working with `hubspot` connection.
     * @example "contacts"
     */
    targeted_object?: string | null;
    /**
     * This optional field is present only when working with `hubspot` connection.
     * @example "dinesh@piedpiper.test"
     */
    email?: string | null;
}
export type CustomerObject = CustomerBaseObject & {
    integration_customers?: IntegrationCustomer[];
};
export interface ErrorDetailObject {
    /**
     * Unique identifier assigned to the error_detail within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the error's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string | null;
    /**
     * Code that specifies part of the application / connection, where the error originally happened
     * @example "tax_error"
     */
    error_code: string;
    /**
     * Key value list of more elaborated error detail, where by the key of error_code an external service error details are stored
     * @example {"tax_error":"taxDateTooFarInFuture"}
     */
    details: Record<string, string>;
}
export type CustomerObjectExtended = CustomerObject & {
    metadata?: CustomerMetadata[];
    /** List of customer taxes */
    taxes?: TaxObject[];
    /** The customer’s invoice custom section used for generating invoices. */
    applicable_invoice_custom_sections?: InvoiceCustomSectionObject[];
    /** List of errors with details that might have been raised while processing backgroud actions for the customers */
    error_details?: ErrorDetailObject[];
};
export interface CustomersPaginated {
    customers: CustomerObjectExtended[];
    meta: PaginationMeta;
}
export interface CustomerCreateInput {
    customer: {
        /**
         * The customer external unique identifier (provided by your own application)
         * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
         */
        external_id: string;
        /**
         * The unique code of the billing entity to associate with the customer. If not provided, the default billing entity will be used.
         * @example "acme_corp"
         */
        billing_entity_code?: string | null;
        /**
         * The first line of the billing address
         * @example "5230 Penfield Ave"
         */
        address_line1?: string | null;
        /**
         * The second line of the billing address
         * @example ""
         */
        address_line2?: string | null;
        /**
         * The city of the customer's billing address
         * @example "Woodland Hills"
         */
        city?: string | null;
        /**
         * Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
         * @example "US"
         */
        country?: CountryOrNull;
        /** Currency of the customer. Format must be ISO 4217 */
        currency?: CurrencyOrNull;
        /**
         * The email of the customer
         * @format email
         * @example "dinesh@piedpiper.test"
         */
        email?: string | null;
        /**
         * The legal company name of the customer
         * @example "Coleman-Blair"
         */
        legal_name?: string | null;
        /**
         * The legal company number of the customer
         * @example "49-008-2965"
         */
        legal_number?: string | null;
        /**
         * The logo URL of the customer
         * @example "http://hooli.com/logo.png"
         */
        logo_url?: string | null;
        /**
         * The full name of the customer
         * @example "Gavin Belson"
         */
        name?: string | null;
        /**
         * First name of the customer
         * @example "Gavin"
         */
        firstname?: string | null;
        /**
         * Last name of the customer
         * @example "Belson"
         */
        lastname?: string | null;
        /**
         * The type of the account. It can have one of the following values:
         * - `customer`: the account is a customer, default value.
         * - `partner`: the account is a partner.
         * @example "customer"
         */
        account_type?: "customer" | "partner";
        /**
         * The type of the customer. It can have one of the following values:
         * - `company`: the customer is a company.
         * - `individual`: the customer is an individual.
         */
        customer_type?: "company" | "individual";
        /**
         * The phone number of the customer
         * @example "1-171-883-3711 x245"
         */
        phone?: string | null;
        /**
         * The state of the customer's billing address
         * @example "CA"
         */
        state?: string | null;
        /** List of unique code used to identify the taxes. */
        tax_codes?: TaxCodes;
        /**
         * The tax identification number of the customer
         * @example "EU123456789"
         */
        tax_identification_number?: string | null;
        /** The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone */
        timezone?: TimezoneOrNull;
        /**
         * The custom website URL of the customer
         * @example "http://hooli.com"
         */
        url?: string | null;
        /**
         * The zipcode of the customer's billing address
         * @example "91364"
         */
        zipcode?: string | null;
        /**
         * The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
         * @example 30
         */
        net_payment_term?: number | null;
        /**
         * Specifies how invoices with a zero total amount should be handled:
         * - `inherit`: (Default) Follows the organization-level configuration.
         * - `finalize`: Invoices are issued and finalized even if the total amount is zero.
         * - `skip`: Invoices with a total amount of zero are not finalized.
         * @example "inherit"
         */
        finalize_zero_amount_invoice?: "inherit" | "skip" | "finalize";
        /** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
        billing_configuration?: CustomerBillingConfiguration;
        /** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
        shipping_address?: Address;
        integration_customers?: {
            /**
             * A unique identifier for the integration customer object in the Lago application.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            id?: string;
            /**
             * The integration type used for accounting and tax syncs.
             * Accepted values: `netsuite, anrok, xero`.
             * @example "netsuite"
             */
            integration_type?: "netsuite" | "anrok" | "xero";
            /**
             * Unique code used to identify an integration connection.
             * @example "netsuite-eu-1"
             */
            integration_code?: string;
            /**
             * The customer ID within the integration's system. If this field is not provided, Lago has the option to create a new customer record within the integration's system on behalf of the customer.
             * @example "cus_12345"
             */
            external_customer_id?: string;
            /**
             * Set this field to `true` if you want to create a customer record in the integration's system. This option is applicable only when the `external_customer_id` is null and the `sync_with_provider` field is set to `true`. By default, the value is set to `false`
             * @example true
             */
            sync_with_provider?: boolean;
            /**
             * This optional field is needed only when working with `netsuite` connection.
             * @example "2"
             */
            subsidiary_id?: string;
        }[];
        /** Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format */
        metadata?: {
            /**
             * Identifier for the metadata object, only required when updating a key-value pair
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            id?: string;
            /**
             * The metadata object key
             * @example "Purchase Order"
             */
            key: string;
            /**
             * The metadata object value
             * @example "123456789"
             */
            value: string;
            /**
             * Determines whether the item or information should be displayed in the invoice. If set to true, the item or information will be included and visible in the generated invoice. If set to false, the item or information will be excluded and not displayed in the invoice.
             * @example true
             */
            display_in_invoice: boolean;
        }[];
        /**
         * Set to `true` to exclude all invoice custom sections from PDF generation for this customer only. False by default
         * @example false
         */
        skip_invoice_custom_sections?: boolean;
        /**
         * List of unique codes identifying the invoice custom sections.
         * @example ["eu_bank_details"]
         */
        invoice_custom_section_codes?: string[];
    };
}
export interface Customer {
    customer: CustomerObjectExtended;
}
export interface InvoiceBaseObject {
    /**
     * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The unique code of the billing entity associated with the invoice
     * @example "acme_corp"
     */
    billing_entity_code: string | null;
    /**
     * This ID helps in uniquely identifying and organizing the invoices associated with a specific customer. It provides a sequential numbering system specific to the customer, allowing for easy tracking and management of invoices within the customer's context.
     * @example 2
     */
    sequential_id?: number;
    /**
     * The unique number assigned to the invoice. This number serves as a distinct identifier for the invoice and helps in differentiating it from other invoices in the system.
     * @example "LAG-1234-001-002"
     */
    number: string;
    /**
     * The date when the invoice was issued. It is provided in the ISO 8601 date format.
     * @format date
     * @example "2022-04-30"
     */
    issuing_date: string;
    /**
     * The date when the payment dispute was lost. It is expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-09-14T16:35:31Z"
     */
    payment_dispute_lost_at?: string;
    /**
     * The payment due date for the invoice, specified in the ISO 8601 date format.
     * @format date
     * @example "2022-04-30"
     */
    payment_due_date?: string;
    /**
     * Specifies if the payment is considered as overdue.
     * @example true
     */
    payment_overdue?: boolean;
    /**
     * The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
     * @example 30
     */
    net_payment_term?: number;
    /**
     * The type of invoice issued. Possible values are `subscription`, `one-off`, `credit` or `progressive_billing`.
     * @example "subscription"
     */
    invoice_type: "subscription" | "add_on" | "credit" | "one_off" | "progressive_billing";
    /**
     * The status of the invoice. It indicates the current state of the invoice and can have following values:
     * - `draft`: the invoice is in the draft state, waiting for the end of the grace period to be finalized. During this period, events can still be ingested and added to the invoice.
     * - `finalized`: the invoice has been issued and finalized. In this state, events cannot be ingested or added to the invoice anymore.
     * - `voided`: the invoice has been issued and subsequently voided. In this state, events cannot be ingested or added to the invoice anymore.
     * - `pending`: the invoice remains pending until the taxes are fetched from the external provider.
     * - `failed`: during an attempt of finalization of the invoice, an error happened. This invoice will have an array of error_details, explaining, in which part of the system an error happened and how it's possible to fix it. This invoice can't be edited or updated, only retried. This action will discard current error_details and will create new ones if the finalization failed again.
     * @example "finalized"
     */
    status: "draft" | "finalized" | "voided" | "failed" | "pending";
    /**
     * The status of the payment associated with the invoice. It can have one of the following values:
     * - `pending`: the payment is pending, waiting for payment processing in Stripe or when the invoice is emitted but users have not updated the payment status through the endpoint.
     * - `succeeded`: the payment of the invoice has been successfully processed.
     * - `failed`: the payment of the invoice has failed or encountered an error during processing.
     * @example "succeeded"
     */
    payment_status: "pending" | "succeeded" | "failed";
    /**
     * The currency of the invoice issued.
     * @example "EUR"
     */
    currency: Currency;
    /**
     * The total sum of fees amount in cents. It calculates the cumulative amount of all the fees associated with the invoice, providing a consolidated value.
     * @example 100
     */
    fees_amount_cents: number;
    /**
     * The total sum of all coupons discounted on the invoice. It calculates the cumulative discount amount applied by coupons, expressed in cents.
     * @example 10
     */
    coupons_amount_cents: number;
    /**
     * The total sum of all credit notes discounted on the invoice. It calculates the cumulative discount amount applied by credit notes, expressed in cents.
     * @example 10
     */
    credit_notes_amount_cents: number;
    /**
     * Subtotal amount, excluding taxes, expressed in cents.
     * This field depends on the version number. Here are the definitions based on the version:
     * - Version 1: is equal to the sum of `fees_amount_cents`, minus `coupons_amount_cents`, and minus `prepaid_credit_amount_cents`.
     * - Version 2: is equal to the `fees_amount_cents`.
     * - Version 3 & 4: is equal to the `fees_amount_cents`, minus `coupons_amount_cents`
     * @example 100
     */
    sub_total_excluding_taxes_amount_cents: number;
    /**
     * The sum of tax amount associated with the invoice, expressed in cents.
     * @example 20
     */
    taxes_amount_cents: number;
    /**
     * Subtotal amount, including taxes, expressed in cents.
     * This field depends on the version number. Here are the definitions based on the version:
     * - Version 1: is equal to the `total_amount_cents`.
     * - Version 2: is equal to the sum of `fees_amount_cents` and `taxes_amount_cents`.
     * - Version 3 & 4: is equal to the sum `sub_total_excluding_taxes_amount_cents` and `taxes_amount_cents`
     * @example 120
     */
    sub_total_including_taxes_amount_cents: number;
    /**
     * The total sum of all prepaid credits discounted on the invoice. It calculates the cumulative discount amount applied by prepaid credits, expressed in cents.
     * @example 0
     */
    prepaid_credit_amount_cents: number;
    /**
     * The portion of prepaid credits discounted on the invoice that originated from granted (free) credits, expressed in cents. Only populated for invoices associated with traceable wallets.
     * @example 0
     */
    prepaid_granted_credit_amount_cents?: number | null;
    /**
     * The portion of prepaid credits discounted on the invoice that originated from purchased (paid) credits, expressed in cents. Only populated for invoices associated with traceable wallets.
     * @example 0
     */
    prepaid_purchased_credit_amount_cents?: number | null;
    /**
     * The usage already billed in previous invoices. Only apply to `progressive_billing` and `subscription` invoices.
     * @example 0
     */
    progressive_billing_credit_amount_cents: number;
    /**
     * The sum of the amount and taxes amount on the invoice, expressed in cents. It calculates the total financial value of the invoice, including both the original amount and any applicable taxes.
     * @example 100
     */
    total_amount_cents: number;
    /** @example 3 */
    version_number: number;
    /**
     * Indicates if the invoice is self-billed. Self-billing is a process where an organization creates the invoice on behalf of the partner. This field specifies whether the invoice is self-billed or not.
     * @example false
     */
    self_billed?: boolean;
    /**
     * Contains the URL that provides direct access to the invoice PDF file. You can use this URL to download or view the PDF document of the invoice
     * @format uri
     * @example "https://getlago.com/invoice/file"
     */
    file_url?: string;
    /**
     * The date of the invoice creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the invoice object was created
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /**
     * The date of the invoice update, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The update_date provides a standardized and internationally recognized timestamp for when the invoice object was updated
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    updated_at: string;
}
export interface BillingPeriodObject {
    /**
     * Unique identifier assigned to the subscription, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_subscription_id: string;
    /**
     * Unique identifier assigned to the subscription in your application.
     * @example "external_id"
     */
    external_subscription_id: string;
    /**
     * Unique identifier assigned to the plan, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_plan_id: string;
    /**
     * The beginning date of the subscription billing period. This field indicates the start date of the billing period associated with the subscription fee.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    subscription_from_datetime: string;
    /**
     * The ending date of the subscription billing period. This field indicates the end date of the billing period associated with the subscription fee.
     * @format date-time
     * @example "2022-05-29T08:59:51Z"
     */
    subscription_to_datetime: string;
    /**
     * The beginning date of the period that covers the charge fees. It is applicable only to the `charge` fees attached to the subscription. This field indicates the start date of the billing period or subscription period associated with the fees.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    charges_from_datetime: string;
    /**
     * The ending date of the period that covers the charge fees. It is applicable only to the `charge` fees attached to the subscription. This field indicates the end date of the billing period or subscription period associated with the fees.
     * @format date-time
     * @example "2022-05-29T08:59:51Z"
     */
    charges_to_datetime: string;
    /**
     * The reason explaining why this subscription appears on the invoice.
     * @example "subscription_starting"
     */
    invoicing_reason: "subscription_starting" | "subscription_periodic" | "subscription_terminating" | "in_advance_charge" | "in_advance_charge_periodic" | "progressive_billing";
}
export interface InvoiceMetadataObject {
    /**
     * Unique identifier assigned to the invoice metadata within the Lago application.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id?: string;
    /**
     * Represents the key of the metadata's key-value pair.
     * @example "digital_ref_id"
     */
    key?: string;
    /**
     * Represents the value of the metadata's key-value pair.
     * @example "INV-0123456-98765"
     */
    value?: string;
    /**
     * The date and time when the metadata object was created. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at?: string;
}
export type InvoiceAppliedTaxObject = BaseAppliedTax & {
    /**
     * Unique identifier of the invoice, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_invoice_id?: string;
    /**
     * Fees total amount on which the tax is applied
     * @example 20000
     */
    fees_amount_cents?: number;
};
export interface InvoiceAppliedInvoiceCustomSectionObject {
    /**
     * Unique identifier of the applied invoice custom section in the Lago application.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Unique identifier of the invoice this custom section is applied to.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_invoice_id: string;
    /**
     * Unique code identifying the invoice custom section.
     * @example "eu_bank_details"
     */
    code: string;
    /**
     * The value shown on the invoice PDF.
     * @example "Bank Name: Lago Bank, IBAN: FR7630004000031234567890143"
     */
    details: string;
    /**
     * The name of the invoice custom section displayed on the invoice.
     * @example "Bank Details:"
     */
    display_name: string;
    /**
     * The date of the applied invoice custom section creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2023-07-06T14:35:58Z"
     */
    created_at: string;
}
export interface UsageThresholdObject {
    /**
     * Unique identifier of the usage threshold created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The display name of the usage threshold.
     * @example "Threshold 1"
     */
    threshold_display_name: string | null;
    /**
     * The amount to reach to trigger a `progressive_billing` invoice.
     * @example 10000
     */
    amount_cents: number;
    /**
     * This field when set to `true` indicates that a `progressive_billing` invoice will be created every time the lifetime usage increases by the specified amount.
     * @example true
     */
    recurring: boolean;
    /**
     * The date and time when the usage threshold was created. It is expressed in UTC format according to the ISO 8601 datetime standard.
     * @format date-time
     * @example "2023-06-27T19:43:42Z"
     */
    created_at: string;
    /**
     * The date and time when the usage threshold was last updated. It is expressed in UTC format according to the ISO 8601 datetime standard.
     * @format date-time
     * @example "2023-06-27T19:43:42Z"
     */
    updated_at: string;
}
export interface AppliedUsageThresholdObject {
    /**
     * The amount of usage in cents that has been accumulated over the lifetime of the subscription.
     * @example 2000
     */
    lifetime_usage_amount_cents: number;
    /**
     * The date and time when the lifetime usage was computed. It is expressed in UTC format according to the ISO 8601 datetime standard.
     * @format date-time
     * @example "2025-03-31T12:31:44Z"
     */
    created_at: string;
    usage_threshold: UsageThresholdObject;
}
export type InvoiceObject = InvoiceBaseObject & {
    /** The customer on which the invoice applies. It refers to the customer account or entity associated with the invoice. */
    customer?: CustomerObject;
    billing_periods?: BillingPeriodObject[];
    metadata?: InvoiceMetadataObject[];
    applied_taxes?: InvoiceAppliedTaxObject[];
    /** The invoice custom sections applied to this invoice for PDF generation. */
    applied_invoice_custom_sections?: InvoiceAppliedInvoiceCustomSectionObject[];
    applied_usage_thresholds?: AppliedUsageThresholdObject[];
};
export interface InvoicesPaginated {
    invoices: InvoiceObject[];
    meta: PaginationMeta;
}
export interface PaymentObject {
    /**
     * The unique identifier of the payment, created by Lago.
     * @format uuid
     * @example "4cf085a7-c196-4f07-a543-97c50ec6e8b2"
     */
    lago_id: string;
    /**
     * Unique identifier of the customer, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /** List of invoice IDs associated with the payment. */
    invoice_ids: string[];
    /** List of invoice numbers associated with the payment. */
    invoice_numbers?: string[];
    /**
     * The unique identifier of the paid resource, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_payable_id: string;
    /**
     * The type of the paid resource, associated with the `lago_payable_id`.
     * @example "Invoice"
     */
    payable_type: "Invoice" | "PaymentRequest";
    /**
     * The amount of the payment in cents.
     * @example 1099
     */
    amount_cents: number;
    /**
     * The currency of the payment amount.
     * @example "USD"
     */
    amount_currency: Currency;
    /**
     * The status of the payment within the payment provider. This can be very different from a payment provider to another.
     * @example "Completed"
     */
    status: string;
    /**
     * The normalized payment status by Lago.
     * @example "succeeded"
     */
    payment_status: "succeeded" | "failed" | "pending" | "processing";
    /**
     * The type of payment.
     * @example "manual"
     */
    type: "manual" | "provider";
    /**
     * Reference for the payment.
     * @example "ref1"
     */
    reference: string;
    /**
     * Code of the payment provider
     * @example "stripe_prod"
     */
    payment_provider_code: string;
    /**
     * The type of payment provider
     * @example "stripe"
     */
    payment_provider_type: "adyen" | "cashfree" | "gocardless" | "stripe" | "flutterwave" | "moneyhash";
    /** DEPRECATED: use provider_payment_id */
    external_payment_id: string | null;
    /**
     * Unique identifier of the payment within the payment provider (if applicable).
     * @example "pi_5eb0285741bc6ba"
     */
    provider_payment_id: string | null;
    /**
     * Unique identifier of the customer within the payment provider
     * @example "cus_5eb0285bcf941bc6ba"
     */
    provider_customer_id: string;
    /**
     * The unique identifier of the payment method used for this payment.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    payment_method_id?: string | null;
    /**
     * The next action to be taken by the customer to complete the payment. Should usually be empty, except when receiving the `payment.requires_action` webhook.
     * @example {"type":"redirect_to_url","redirect_to_url":{"url":"https://hooks.stripe.com/3d_secure_2/hosted?merchant=acct_AAA&payment_intent=pi_BBB&payment_intent_client_secret=pi_BBB&publishable_key=pk_test_CCC","return_url":"https://app.example.com"}}
     */
    next_action: Record<string, any>;
    /**
     * Timestamp when the payment was created in Lago's database, not on the payment provider.
     * @format date-time
     * @example "2025-01-21T00:10:29Z"
     */
    created_at: string;
}
export interface PaymentsPaginated {
    payments: PaymentObject[];
    meta: PaginationMeta;
}
export interface PaymentRequestObject {
    /**
     * Unique identifier of the payment request, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The customer's email address used for sending dunning notifications
     * @format email
     * @example "dinesh@piedpiper.test"
     */
    email: string;
    /**
     * The sum of the total amounts of all the invoices included in the payment request, expressed in cents.
     * @example 100
     */
    amount_cents: number;
    /**
     * The currency of the payment request.
     * @example "EUR"
     */
    amount_currency: Currency;
    /**
     * The status of the payment associated with the payment request. It can have one of the following values:
     * - `pending`: the payment is pending, waiting for payment processing in the payment provider or when the invoice is emitted but users have not updated the payment status through the endpoint.
     * - `succeeded`: the payment of the payment request has been successfully processed.
     * - `failed`: the payment of the payment request has failed or encountered an error during processing.
     * @example "succeeded"
     */
    payment_status: "pending" | "succeeded" | "failed";
    /**
     * The date and time when the payment request was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the payment request was initially created.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /** The customer on which the payment request applies. It refers to the customer account or entity associated with the payment request. */
    customer: CustomerBaseObject;
    invoices: InvoiceBaseObject[];
}
export interface PaymentRequestsPaginated {
    payment_requests: PaymentRequestObject[];
    meta: PaginationMeta;
}
export interface AppliedInvoiceCustomSectionObject {
    /**
     * Unique identifier of the applied invoice custom section in the Lago application.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The date of the applied invoice custom section creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2023-07-06T14:35:58Z"
     */
    created_at: string;
    /**
     * Unique identifier of the invoice custom section that was applied.
     * @deprecated
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    invoice_custom_section_id?: string;
    invoice_custom_section: InvoiceCustomSectionObject;
}
/** Reference to a specific payment method for processing the payment. */
export interface PaymentMethodReference {
    /**
     * The type of payment method to use.
     * @example "provider"
     */
    payment_method_type?: "provider" | "manual";
    /**
     * The unique identifier of the payment method (required when using a specific provider payment method).
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    payment_method_id?: string;
}
export interface SubscriptionObject {
    /**
     * Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription's record within the Lago system
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The subscription external unique identifier (provided by your own application).
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_id: string;
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application).
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /**
     * The billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration).
     * @example "anniversary"
     */
    billing_time: "calendar" | "anniversary";
    /**
     * The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan.
     * @example "Repository A"
     */
    name: string | null;
    /**
     * The unique code representing the plan to be attached to the customer. This code must correspond to the `code` property of one of the active plans.
     * @example "premium"
     */
    plan_code: string;
    /**
     * The base cost of the related plan, excluding any applicable taxes, that is billed on a recurring basis.
     * @example 10000
     */
    plan_amount_cents?: number;
    /**
     * The currency of the related plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.
     * @example "USD"
     */
    plan_amount_currency?: Currency;
    /**
     * The status of the subscription, which can have the following values:
     * - `active`: the subscription is currently active and applied to the customer.
     * - `canceled`: the subscription has been stopped before its activation. This can occur when two consecutive downgrades have been applied to a customer or when a subscription with a pending status is terminated.
     * - `pending`: a previous subscription has been downgraded, and the current one is awaiting automatic activation at the end of the billing period.
     * - `terminated`: the subscription is no longer active.
     * @example "active"
     */
    status: "active" | "canceled" | "pending" | "terminated";
    /**
     * The creation date of the subscription, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). This date provides a timestamp indicating when the subscription was initially created.
     * @format date-time
     * @example "2022-08-08T00:00:00Z"
     */
    created_at: string;
    /**
     * The cancellation date of the subscription. This field is not null when the subscription is `canceled`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-09-14T16:35:31Z"
     */
    canceled_at: string | null;
    /**
     * The effective start date of the subscription. This field can be null if the subscription is `pending` or `canceled`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-08-08T00:00:00Z"
     */
    started_at: string | null;
    /**
     * The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-10-08T00:00:00Z"
     */
    ending_at: string | null;
    /**
     * The anniversary date and time of the initial subscription. This date serves as the basis for billing subscriptions with `anniversary` billing time. The `anniversary_date` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-08-08T00:00:00Z"
     */
    subscription_at: string;
    /**
     * The termination date of the subscription. This field is not null when the subscription is `terminated`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC)
     * @format date-time
     * @example "2022-09-14T16:35:31Z"
     */
    terminated_at: string | null;
    /**
     * The code identifying the previous plan associated with this subscription.
     * @example null
     */
    previous_plan_code: string | null;
    /**
     * The code identifying the next plan in the case of a downgrade.
     * @example null
     */
    next_plan_code: string | null;
    /**
     * The date when the plan will be downgraded, represented in ISO 8601 date format.
     * @format date
     * @example "2022-04-30"
     */
    downgrade_plan_date: string | null;
    /**
     * The date when the free trial is ended, represented in ISO 8601 date format.
     * @format date-time
     * @example "2022-08-08T00:00:00Z"
     */
    trial_ended_at: string | null;
    /**
     * The date and time when the current billing period started, represented in ISO 8601 date format.
     * @format date-time
     * @example "2022-08-08T00:00:00Z"
     */
    current_billing_period_started_at: string | null;
    /**
     * The date and time when the current billing period ends, represented in ISO 8601 date format.
     * @format date-time
     * @example "2022-09-08T00:00:00Z"
     */
    current_billing_period_ending_at: string | null;
    /**
     * When a pay-in-advance subscription is terminated before the end of its billing period, we generate a credit note for the unused subscription time by default.
     * This field allows you to control the behavior of the credit note generation:
     *
     * - `credit`: A credit note is generated for the unused subscription time. The unused amount is credited back to the customer.
     * - `refund`: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer.
     * - `offset`: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is applied to the invoice reducing its amount due.
     * - `skip`: No credit note is generated for the unused subscription time.
     *
     * _Note: This field is only applicable to pay-in-advance plans and will be `null` for pay-in-arrears plans._
     * @example "credit"
     */
    on_termination_credit_note: "credit" | "refund" | "offset" | "skip";
    /**
     * When a subscription is terminated before the end of its billing period, we generate an invoice for the unbilled usage.
     * This field allows you to control the behavior of the invoice generation:
     *
     * - `generate`: An invoice is generated for the unbilled usage.
     * - `skip`: No invoice is generated for the unbilled usage.
     * @default "generate"
     * @example "generate"
     */
    on_termination_invoice: "generate" | "skip";
    /** The invoice custom sections applied to invoices generated by this subscription. */
    applied_invoice_custom_sections?: AppliedInvoiceCustomSectionObject[];
    /** The payment method assigned to this subscription for processing payments. */
    payment_method?: PaymentMethodReference;
}
export interface SubscriptionsPaginated {
    subscriptions: SubscriptionObject[];
    meta: PaginationMeta;
}
/** Object that represents rule for wallet recurring transactions. */
export interface WalletRecurringTransactionRule {
    /**
     * A unique identifier for the recurring transaction rule in the Lago application. Can be used to update a recurring transaction rule.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The trigger. Possible values are `interval` or `threshold`.
     * @example "interval"
     */
    trigger: "interval" | "threshold";
    /**
     * The method used for recurring top-up. Possible values are `fixed` or `target`.
     * @example "target"
     */
    method: "fixed" | "target";
    /**
     * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly`, `semiannual` or `yearly`. Required only if trigger is set to `interval`.
     * @example "monthly"
     */
    interval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly";
    /**
     * The status of the recurring transaction rule. Possible values are `active` or `terminated`.
     * @example "active"
     */
    status: "active" | "terminated";
    /**
     * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when trigger is set to `threshold`.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "20.0"
     */
    threshold_credits: string;
    /**
     * The number of paid credits. Required only if there is no granted credits.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "20.0"
     */
    paid_credits: string;
    /**
     * The number of free granted credits. Required only if there is no paid credits.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "10.0"
     */
    granted_credits: string;
    /**
     * The effective start date for recurring top-ups. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-08-08T00:00:00Z"
     */
    started_at: string | null;
    /**
     * The target ongoing balance is the value set for the ongoing balance to be reached by the automatic top-up. Required only when trigger is set to `target`.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "200.0"
     */
    target_ongoing_balance: string | null;
    /**
     * The date of the metadata object creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the metadata object was created
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /**
     * The expiration date and time for this specific recurring transaction rule. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2023-09-30T23:59:59Z"
     */
    expiration_at: string | null;
    /**
     * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
     * @example false
     */
    invoice_requires_successful_payment: boolean;
    /**
     * This field allows you to store a list of key-value pairs containing additional information or custom attributes. These key-value pairs will populate the metadata of the wallet transactions triggered by this rule.
     * @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
     */
    transaction_metadata: {
        /** The unique identifier for the attribute. */
        key?: string;
        /** The value associated with the key. */
        value?: string;
    }[];
    /**
     * The name of the wallet transactions triggered by this rule. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.
     * @example "Tokens for models 'high-fidelity-boost'"
     */
    transaction_name: string | null;
    /**
     * When true, allows rule to topped up wallet with transactions that exceed the paid top-up limits. Defaults to false.
     * @example false
     */
    ignore_paid_top_up_limits: boolean;
    /** The invoice custom sections applied to invoices generated by this recurring transaction rule. */
    applied_invoice_custom_sections?: AppliedInvoiceCustomSectionObject[];
    /** The payment method assigned to this recurring transaction rule for processing top-up payments. */
    payment_method?: PaymentMethodReference;
}
export interface WalletObject {
    /**
     * Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "hooli_1234"
     */
    external_customer_id: string;
    /**
     * The status of the wallet. Possible values are `active` or `terminated`.
     * @example "active"
     */
    status: "active" | "terminated";
    /**
     * The currency of the wallet.
     * @example "USD"
     */
    currency: Currency;
    /**
     * The name of the wallet.
     * @example "Prepaid"
     */
    name?: string | null;
    /**
     * The code of the wallet.
     * @example "prepaid"
     */
    code?: string | null;
    /**
     * Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.
     * @min 1
     * @max 50
     * @example 50
     */
    priority?: number;
    /**
     * The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "1.5"
     */
    rate_amount: string;
    /**
     * The current wallet balance expressed in credits. This reflects the available balance after all transactions are settled.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "28.0"
     */
    credits_balance: string;
    /**
     * The current wallet balance expressed in cents. This reflects the available balance after all transactions are settled.
     * @example 1000
     */
    balance_cents: number;
    /**
     * The number of consumed credits.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "2.0"
     */
    consumed_credits: string;
    /**
     * The date of the wallet creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /**
     * The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example null
     */
    expiration_at?: string | null;
    /**
     * The date and time of the last balance top-up. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    last_balance_sync_at?: string | null;
    /**
     * The date and time of the last credits consumption. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    last_consumed_credit_at?: string | null;
    /**
     * The date of terminaison of the wallet. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-09-14T16:35:31Z"
     */
    terminated_at?: string | null;
    /**
     * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
     * @example false
     */
    invoice_requires_successful_payment: boolean;
    /** Set wallet limitations to fee types. */
    applies_to?: {
        /**
         * An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.
         * @example ["charge"]
         */
        fee_types?: ("charge" | "subscription" | "commitment")[];
        /**
         * An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.
         * @example ["bm1"]
         */
        billable_metric_codes?: string[];
    };
    /** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
    recurring_transaction_rules?: WalletRecurringTransactionRule[];
    /**
     * The ongoing wallet balance expressed in cents. This represents the `balance_cents` minus the `ongoing_usage_balance_cents`, showing the real time balance after accounting for current usage including taxes.
     * @example 800
     */
    ongoing_balance_cents: number;
    /**
     * The ongoing usage balance of the wallet, expressed in cents. This reflects all current usage and draft invoices including taxes.
     * @example 200
     */
    ongoing_usage_balance_cents: number;
    /**
     * The ongoing wallet balance expressed in credits. This represents the `credits_balance` minus the `credits_ongoing_usage_balance`, showing the real time balance after accounting for current usage including taxes.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "8.0"
     */
    credits_ongoing_balance: string;
    /**
     * The ongoing usage balance of the wallet, expressed in credits. This reflects all current usage and draft invoices including taxes.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "2.0"
     */
    credits_ongoing_usage_balance: string;
    /**
     * Minimum amount of cents that can be top-up with a single paid transaction.
     * @example 100
     */
    paid_top_up_min_amount_cents?: number | null;
    /**
     * Maximum amount of cents that can be top-up with a single paid transaction.
     * @example 1000
     */
    paid_top_up_max_amount_cents?: number | null;
    /** The invoice custom sections applied to invoices generated by this wallet. */
    applied_invoice_custom_sections?: AppliedInvoiceCustomSectionObject[];
    /** The payment method assigned to this wallet for processing top-up payments. */
    payment_method?: PaymentMethodReference;
    /**
     * Custom metadata stored as key-value pairs.
     * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
     */
    metadata?: MetadataObject;
}
export interface WalletsPaginated {
    wallets: WalletObject[];
    meta: PaginationMeta;
}
/** Configuration for invoice custom sections to apply to invoices generated by this resource. */
export interface InvoiceCustomSectionInput {
    /**
     * Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.
     * @example false
     */
    skip_invoice_custom_sections?: boolean;
    /**
     * List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.
     * @example ["eu_bank_details"]
     */
    invoice_custom_section_codes?: string[];
}
export interface WalletCreateInput {
    wallet?: {
        /**
         * The name of the wallet.
         * @example "Prepaid"
         */
        name?: string | null;
        /**
         * The code of the wallet.
         * @example "prepaid"
         */
        code?: string | null;
        /**
         * Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.
         * @min 1
         * @max 50
         * @example 50
         */
        priority?: number;
        /**
         * The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "1.5"
         */
        rate_amount: string;
        /**
         * The currency of the wallet.
         * @example "USD"
         */
        currency: Currency;
        /**
         * The number of paid credits. Required only if there is no granted credits.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "20.0"
         */
        paid_credits?: string | null;
        /**
         * The number of free granted credits. Required only if there is no paid credits.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "10.0"
         */
        granted_credits?: string | null;
        /**
         * The customer external unique identifier (provided by your own application)
         * @example "hooli_1234"
         */
        external_customer_id: string;
        /**
         * The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
         * @format date-time
         * @example "2022-07-07T23:59:59Z"
         */
        expiration_at?: string | null;
        /**
         * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
         * @example false
         */
        invoice_requires_successful_payment?: boolean;
        /**
         * This optional field allows you to store a list of key-value pairs that provide additional information or custom attributes. These key-value pairs will be included in the metadata of wallet transactions generated during the wallet creation process.
         * @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
         */
        transaction_metadata?: any[] | null;
        /**
         * The name of the wallet transactions triggered when creating the wallet. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.
         * @example "Tokens for models 'high-fidelity-boost'"
         */
        transaction_name?: string | null;
        /** Set wallet limitations to fee types. */
        applies_to?: {
            /**
             * An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.
             * @example ["charge"]
             */
            fee_types?: any[] | null;
            /**
             * An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.
             * @example []
             */
            billable_metric_codes?: any[] | null;
        };
        /**
         * Minimum amount of cents that can be top-up with a single paid transaction.
         * @example 100
         */
        paid_top_up_min_amount_cents?: number | null;
        /**
         * Maximum amount of cents that can be top-up with a single paid transaction.
         * @example 1000
         */
        paid_top_up_max_amount_cents?: number | null;
        /**
         * If set to true, the wallet will ignore paid top-up limits on creation.
         * @example false
         */
        ignore_paid_top_up_limits_on_creation?: boolean | null;
        /** Configuration for invoice custom sections to apply to invoices generated by this resource. */
        invoice_custom_section?: InvoiceCustomSectionInput;
        /** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
        recurring_transaction_rules?: any[] | null;
        /** Optional payment method to use for processing wallet top-up payments. */
        payment_method?: PaymentMethodReference;
        /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
        metadata?: MetadataInput;
    };
}
export interface Wallet {
    wallet: WalletObject;
}
export interface WalletUpdateInput {
    wallet: {
        /**
         * The name of the wallet.
         * @example "new_name"
         */
        name?: string | null;
        /**
         * The code of the wallet.
         * @example "prepaid"
         */
        code?: string | null;
        /**
         * Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.
         * @min 1
         * @max 50
         * @example 50
         */
        priority?: number;
        /**
         * The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
         * @format date-time
         * @example "2022-07-07T23:59:59Z"
         */
        expiration_at?: string | null;
        /**
         * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
         * @example false
         */
        invoice_requires_successful_payment?: boolean;
        /** Configuration for invoice custom sections to apply to invoices generated by this resource. */
        invoice_custom_section?: InvoiceCustomSectionInput;
        /** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
        recurring_transaction_rules?: {
            /**
             * A unique identifier for the recurring transaction rule in the Lago application. Can be used to update a recurring transaction rule.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            lago_id?: string;
            /**
             * The trigger. Possible values are `interval` or `threshold`.
             * @example "interval"
             */
            trigger?: "interval" | "threshold";
            /**
             * The method used for recurring top-up. Possible values are `fixed` or `target`.
             * @example "target"
             */
            method?: "fixed" | "target";
            /**
             * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly`, `semiannual` or `yearly`. Required only when trigger is set to `interval`.
             * @example "monthly"
             */
            interval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly";
            /**
             * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when trigger is set to `threshold`.
             * @pattern ^[0-9]+.?[0-9]*$
             * @example "20.0"
             */
            threshold_credits?: string;
            /**
             * The number of paid credits. Required only if there is no granted credits.
             * @pattern ^[0-9]+.?[0-9]*$
             * @example "20.0"
             */
            paid_credits?: string | null;
            /**
             * The number of free granted credits. Required only if there is no paid credits.
             * @pattern ^[0-9]+.?[0-9]*$
             * @example "10.0"
             */
            granted_credits?: string | null;
            /**
             * The effective start date for recurring top-ups. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
             * @format date-time
             * @example "2022-08-08T00:00:00Z"
             */
            started_at?: string | null;
            /**
             * The expiration date and time for this specific recurring transaction rule. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
             * @format date-time
             * @example "2023-09-30T23:59:59Z"
             */
            expiration_at?: string | null;
            /**
             * The target ongoing balance is the value set for the ongoing balance to be reached by the automatic top-up. Required only when trigger is set to `target`.
             * @pattern ^[0-9]+.?[0-9]*$
             * @example "200.0"
             */
            target_ongoing_balance?: string;
            /**
             * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
             * @example false
             */
            invoice_requires_successful_payment?: boolean;
            /**
             * This optional field allows you to store a list of key-value pairs containing additional information or custom attributes. These key-value pairs will populate the metadata of the wallet transactions triggered by this rule.
             * @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
             */
            transaction_metadata?: {
                /** The unique identifier for the attribute. */
                key?: string;
                /** The value associated with the key. */
                value?: string;
            }[];
            /**
             * The name of the wallet transactions triggered by this rule. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.
             * @example "Tokens for models 'high-fidelity-boost'"
             */
            transaction_name?: string | null;
            /** Configuration for invoice custom sections to apply to invoices generated by this resource. */
            invoice_custom_section?: InvoiceCustomSectionInput;
            /** Optional payment method to use for processing recurring top-up payments. */
            payment_method?: PaymentMethodReference;
        }[];
        /** Optional payment method to use for processing wallet top-up payments. */
        payment_method?: PaymentMethodReference;
        /** Set wallet limitations to fee types. */
        applies_to?: {
            /**
             * An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.
             * @example ["charge"]
             */
            fee_types?: any[] | null;
            /**
             * An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.
             * @example []
             */
            billable_metric_codes?: any[] | null;
        };
        /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
        metadata?: MetadataInput;
    };
}
export interface WalletMetadataResponse {
    /**
     * Custom metadata stored as key-value pairs.
     * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
     */
    metadata: MetadataObject;
}
export interface AlertThresholdBaseObject {
    /**
     * Unique identifier of the usage threshold created by Lago.
     * @example "warn"
     */
    code?: string | null;
    /**
     * This field when set to `true` indicates that the alert will be retrigger when this threshold is reached after the last non-recurring threshold. Only one recurring threshold per alert allowed.
     * @default false
     * @example false
     */
    recurring?: boolean;
}
export type AlertThresholdObject = AlertThresholdBaseObject & {
    /**
     * A value that should trigger this alert, formatted as a BigDecimal.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "99.0"
     */
    value: string;
};
export interface WalletAlertObject {
    /**
     * Unique identifier of the alert, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Unique identifier of the organization, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_organization_id: string;
    external_subscription_id: null;
    /**
     * Unique identifier of the wallet, created by Lago.
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_wallet_id?: string;
    /**
     * The wallet external unique identifier (provided by your own application).
     * @example "wallet_code"
     */
    wallet_code?: string;
    billable_metric: null;
    /**
     * The type of alert.
     * @example "wallet_balance_amount"
     */
    alert_type: "wallet_balance_amount" | "wallet_credits_balance" | "wallet_ongoing_balance_amount" | "wallet_credits_ongoing_balance";
    /**
     * Unique code used to identify the alert.
     * @example "wallet_balance_alert"
     */
    code: string;
    /**
     * The name of the alert.
     * @example "Wallet Balance Alert"
     */
    name: string | null;
    /**
     * Indicates whether the alert is triggered when the monitored metric goes above or below the threshold.
     * @example "decreasing"
     */
    direction?: "increasing" | "decreasing";
    /**
     * When the system checked if this alert should be triggered, this value was retrieved and checked against the thresholds.
     * @example 1000
     */
    previous_value: number;
    /**
     * The date and time in UTC (ISO 8601) when the system checked if this alert should be triggered. Null until it's processed for the first time.
     * @format date-time
     * @example "2025-05-19T10:04:21Z"
     */
    last_processed_at: string | null;
    /** Array of thresholds associated with the alert. */
    thresholds: AlertThresholdObject[];
    /**
     * The date and time in UTC (ISO 8601) when the alert was created.
     * @format date-time
     * @example "2025-03-20T10:00:00Z"
     */
    created_at: string;
}
export interface WalletAlerts {
    alerts: WalletAlertObject[];
    meta?: PaginationMeta;
}
export type AlertThresholdInput = AlertThresholdBaseObject & {
    /**
     * A value that should trigger this alert. This can be an integer or a string formatted as a BigDecimal.
     * @example 99
     */
    value: number | string;
};
export interface AlertBaseInput {
    /**
     * Unique code used to identify the alert.
     * @example "storage_threshold_alert"
     */
    code?: string;
    /**
     * The name of the alert.
     * @example "Storage Usage Alert"
     */
    name?: string | null;
    /** Array of thresholds associated with the alert. */
    thresholds?: AlertThresholdInput[];
}
export interface WalletAlertCreateInput {
    alert: AlertBaseInput & {
        /**
         * The type of alert.
         * @example "wallet_balance_amount"
         */
        alert_type: "wallet_balance_amount" | "wallet_credits_balance" | "wallet_ongoing_balance_amount" | "wallet_credits_ongoing_balance";
        /**
         * Unique code used to identify the alert.
         * @example "wallet_balance_alert"
         */
        code: string;
        /**
         * The name of the alert.
         * @example "Wallet Balance Alert"
         */
        name?: string | null;
    };
}
export interface WalletAlertBatchCreateInput {
    /** Array of alerts to create. All alerts are created atomically - if any fail validation, none are created. */
    alerts: (AlertBaseInput & {
        /**
         * The type of alert.
         * @example "wallet_balance_amount"
         */
        alert_type: "wallet_balance_amount" | "wallet_credits_balance" | "wallet_ongoing_balance_amount" | "wallet_credits_ongoing_balance";
        /**
         * Unique code used to identify the alert.
         * @example "wallet_balance_alert"
         */
        code: string;
        /**
         * The name of the alert.
         * @example "Wallet Balance Alert"
         */
        name?: string | null;
    })[];
}
export interface WalletAlert {
    alert: WalletAlertObject;
}
export interface WalletAlertUpdateInput {
    alert: AlertBaseInput & {
        /**
         * Unique code used to identify the alert.
         * @example "wallet_balance_alert"
         */
        code?: string;
        /**
         * The name of the alert.
         * @example "Wallet Balance Alert"
         */
        name?: string | null;
    };
}
/** Details about the pricing unit used for charge usage. */
export interface UsagePricingUnitDetailsObject {
    /**
     * The amount in cents in the pricing unit.
     * @example 200
     */
    amount_cents: number;
    /**
     * The short name of the pricing unit.
     * @example "CR"
     */
    short_name: string;
    /**
     * The conversion rate from pricing units to the plan's currency.
     * @example "0.5"
     */
    conversion_rate: string;
}
/** Array of filter object, representing multiple dimensions for a charge item. */
export type CustomerChargeFiltersUsageObject = {
    /**
     * The number of units consumed for a specific charge filter related to a charge item.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "0.9"
     */
    units?: string;
    /**
     * The total number of units consumed by the customer for a specific charge item, aggregated across all usage events.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "1.0"
     */
    total_aggregated_units?: string;
    /**
     * The amount in cents, tax excluded, consumed for a specific charge filter related to a charge item.
     * @example 1000
     */
    amount_cents?: number;
    /**
     * The quantity of usage events that have been recorded for a particular charge filter during the specified time period. These events may also be referred to as the number of transactions in some contexts.
     * @example 10
     */
    events_count?: number;
    /**
     * Specifies the name that will be displayed on an invoice.
     * @example "AWS eu-east-1"
     */
    invoice_display_name?: string;
    /** Details about the pricing unit used for charge usage. */
    pricing_unit_details?: UsagePricingUnitDetailsObject;
    /**
     * List of filter values applied to the usage.
     * @example {"region":["us-east-1"]}
     */
    values?: Record<string, string[]>;
}[];
/** Array of aggregated fees, grouped by the event properties defined in a `standard` charge model. */
export type CustomerChargeGroupedUsageObject = {
    /**
     * The amount in cents, tax excluded, consumed for a specific group related to a charge item.
     * @example 1000
     */
    amount_cents?: number;
    /**
     * The quantity of usage events that have been recorded for a particular charge during the specified time period. These events may also be referred to as the number of transactions in some contexts.
     * @example 10
     */
    events_count?: number;
    /**
     * The number of units consumed for a specific group related to a charge item.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "0.9"
     */
    units?: string;
    /**
     * The total number of units consumed by the customer for a specific charge item, aggregated across all usage events.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "1.0"
     */
    total_aggregated_units?: string;
    /** Details about the pricing unit used for charge usage. */
    pricing_unit_details?: UsagePricingUnitDetailsObject;
    /** Key value list of event properties aggregated by the charge model */
    grouped_by?: Record<string, string>;
    /** Array of filter object, representing multiple dimensions for a charge item. */
    filters?: CustomerChargeFiltersUsageObject;
}[];
export interface CustomerChargeUsageObject {
    /**
     * The number of units consumed by the customer for a specific charge item.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "1.0"
     */
    units: string;
    /**
     * The total number of units consumed by the customer for a specific charge item, aggregated across all usage events.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "1.0"
     */
    total_aggregated_units: string;
    /**
     * The quantity of usage events that have been recorded for a particular charge during the specified time period. These events may also be referred to as the number of transactions in some contexts.
     * @example 10
     */
    events_count: number;
    /**
     * The amount in cents, tax excluded, consumed by the customer for a specific charge item.
     * @example 123
     */
    amount_cents: number;
    /**
     * The currency of a usage item consumed by the customer.
     * @example "EUR"
     */
    amount_currency: Currency;
    /** Details about the pricing unit used for charge usage. */
    pricing_unit_details?: UsagePricingUnitDetailsObject;
    /** Object listing all the properties for a specific charge item. */
    charge: {
        /**
         * Unique identifier assigned to the charge within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the charge's record within the Lago system.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_id: string;
        /**
         * The pricing model applied to this charge. Possible values are standard, `graduated`, `percentage`, `package` or `volume`.
         * @example "graduated"
         */
        charge_model: "standard" | "graduated" | "package" | "percentage" | "volume";
        /**
         * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
         * @example "Setup"
         */
        invoice_display_name?: string;
    };
    /** The related billable metric object. */
    billable_metric: {
        /**
         * Unique identifier assigned to the billable metric within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the billable metric's record within the Lago system.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_id: string;
        /**
         * The name of the billable metric used for this charge.
         * @example "Storage"
         */
        name: string;
        /**
         * The code of the billable metric used for this charge.
         * @example "storage"
         */
        code: string;
        /**
         * The aggregation type of the billable metric used for this charge. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`.
         * @example "sum_agg"
         */
        aggregation_type: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg" | "weighted_sum_agg" | "latest_agg";
    };
    /** Array of filter object, representing multiple dimensions for a charge item. */
    filters?: CustomerChargeFiltersUsageObject;
    /** Array of aggregated fees, grouped by the event properties defined in a `standard` charge model. */
    grouped_usage?: CustomerChargeGroupedUsageObject;
}
export interface CustomerUsageObject {
    /**
     * The lower bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-07-01T00:00:00Z"
     */
    from_datetime: string;
    /**
     * The upper bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-07-31T23:59:59Z"
     */
    to_datetime: string;
    /**
     * The date of creation of the invoice.
     * @format date
     * @example "2022-08-01"
     */
    issuing_date: string;
    /**
     * A unique identifier associated with the invoice related to this particular usage record.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_invoice_id?: string | null;
    /**
     * The currency of the customer's current usage.
     * @example "EUR"
     */
    currency?: Currency;
    /**
     * The amount in cents, tax excluded.
     * @example 123
     */
    amount_cents: number;
    /**
     * The tax amount in cents.
     * @example 200
     */
    taxes_amount_cents: number;
    /**
     * The total amount in cents, tax included.
     * @example 123
     */
    total_amount_cents: number;
    /** Array of charges that comprise the current usage. It contains detailed information about individual charge items associated with the usage. */
    charges_usage: CustomerChargeUsageObject[];
}
export interface CustomerUsage {
    customer_usage: CustomerUsageObject;
}
export interface CustomerProjectedUsageObject {
    /**
     * The lower bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-07-01T00:00:00Z"
     */
    from_datetime: string;
    /**
     * The upper bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-07-31T23:59:59Z"
     */
    to_datetime: string;
    /**
     * The date of creation of the invoice.
     * @format date
     * @example "2022-08-01"
     */
    issuing_date: string;
    /**
     * A unique identifier associated with the invoice related to this particular usage record.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_invoice_id?: string | null;
    /**
     * The currency of the customer's current usage.
     * @example "EUR"
     */
    currency?: Currency;
    /**
     * The amount in cents, tax excluded.
     * @example 123
     */
    amount_cents: number;
    /**
     * The projected amount in cents, tax excluded.
     * @example 256
     */
    projected_amount_cents: number;
    /**
     * The tax amount in cents.
     * @example 200
     */
    taxes_amount_cents: number;
    /**
     * The total amount in cents, tax included.
     * @example 123
     */
    total_amount_cents: number;
    /** Array of charges that comprise the current usage. It contains detailed information about individual charge items associated with the usage. */
    charges_usage: CustomerChargeUsageObject[];
}
export interface CustomerProjectedUsage {
    customer_projected_usage: CustomerProjectedUsageObject;
}
export interface CustomerPastUsage {
    usage_periods: CustomerUsage[];
    meta: PaginationMeta;
}
export interface CustomerCheckoutUrl {
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /**
     * The Payment Provider name linked to the Customer.
     * @example "stripe"
     */
    payment_provider: string;
    /**
     * Code of the payment provider
     * @example "Stripe Prod"
     */
    payment_provider_code?: string;
    /**
     * The new generated Payment Provider Checkout URL for the Customer.
     * @example "https://foo.bar"
     */
    checkout_url?: string;
}
export interface PaymentMethodObject {
    /**
     * The unique identifier of the payment method, created by Lago.
     * @format uuid
     * @example "4cf085a7-c196-4f07-a543-97c50ec6e8b2"
     */
    lago_id: string;
    /**
     * Indicates whether this payment method is the default one for the customer.
     * @example true
     */
    is_default: boolean;
    /**
     * Code of the payment provider associated with this payment method.
     * @example "stripe_prod"
     */
    payment_provider_code?: string | null;
    /**
     * Human-readable name of the payment provider.
     * @example "Stripe"
     */
    payment_provider_name?: string | null;
    /**
     * The type of the payment provider.
     * @example "stripe"
     */
    payment_provider_type: "adyen" | "cashfree" | "gocardless" | "stripe" | "flutterwave" | "moneyhash";
    /**
     * Unique identifier of the payment method within the payment provider.
     * @example "pm_1N8ZQX2eZvKYlo2CkL9Y8XYZ"
     */
    provider_method_id: string;
    /**
     * Timestamp when the payment method was created in Lago's database.
     * @format date-time
     * @example "2025-01-21T00:10:29Z"
     */
    created_at: string;
}
export interface PaymentMethodsPaginated {
    payment_methods: PaymentMethodObject[];
    meta: PaginationMeta;
}
export interface PaymentMethod {
    payment_method: PaymentMethodObject;
}
export interface EventObject {
    /**
     * Unique identifier assigned to the event within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the event's record within the Lago system
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id?: string | null;
    /**
     * This field represents a unique identifier for the event. It is crucial for ensuring idempotency, meaning that each event can be uniquely identified and processed without causing any unintended side effects.
     * @example "transaction_1234567890"
     */
    transaction_id: string;
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string | null;
    /**
     * The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.
     * @example "storage"
     */
    code: string;
    /**
     * This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC). If this timestamp is not provided, the API will automatically set it to the time of event reception.
     * @format date-time
     * @example "2022-04-29T08:59:51.123Z"
     */
    timestamp: string;
    /**
     * The precise total amount that was sent in the event payload. This filed is used by the `dynamic` pricing model.
     * @example "1234.56"
     */
    precise_total_amount_cents?: string | null;
    /**
     * This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required.
     * @example {"gb":10}
     */
    properties?: {
        /** The `operation_type` field is only necessary when adding or removing a specific unit when the targeted billable metric adopts a `unique_count_agg` aggregation method. In other cases, the `operation_type` field is not required. The valid values for the `operation_type` field are `add` or `remove`, which indicate whether the unit is being added or removed from the unique count aggregation, respectively. */
        operation_type?: "add" | "remove";
        [key: string]: any;
    };
    /**
     * Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription's record within the Lago system
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_subscription_id: string | null;
    /**
     * The unique identifier of the subscription within your application. It is a mandatory field when the customer possesses multiple subscriptions or when the `external_customer_id` is not provided.
     * @example "sub_1234567890"
     */
    external_subscription_id: string;
    /**
     * The creation date of the event's record in the Lago application, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). It provides the precise timestamp of when the event's record was created within the Lago application
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at?: string | null;
}
export interface EventsPaginated {
    events: EventObject[];
    meta: PaginationMeta;
}
export interface EventInputObject {
    /**
     * This field represents a unique identifier for the event.
     * It is crucial for ensuring idempotency, meaning that each event can be uniquely identified and processed without causing any unintended side effects.
     *
     * WARNING: If the Lago organization is configured to use the new Clickhouse-based event pipeline (designed for high-volume processing), the idempotency logic is handled differently.
     * Event uniqueness is maintained with both `transaction_id` and `timestamp` fields.
     * If a new event arrives with identical values for these two fields as an existing event, the new one will overwrite the previous event rather than being rejected.
     * @example "transaction_1234567890"
     */
    transaction_id: string;
    /**
     * The unique identifier of the subscription in your application. This field is mandatory in order to link events to the correct customer subscription.
     * @example "sub_1234567890"
     */
    external_subscription_id: string;
    /**
     * The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.
     * @example "storage"
     */
    code: string;
    /**
     * This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC).
     * If this timestamp is not provided, the API will automatically set it to the time of event reception.
     * You can also provide miliseconds precision by appending decimals to the timestamp.
     * @example "1651240791.123"
     */
    timestamp?: number | string;
    /**
     * The precise total amount in cents with precision used by the `dynamic` pricing model to compute the usage amount.
     * @example "1234.56"
     */
    precise_total_amount_cents?: string | null;
    /**
     * This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required.
     * @example {"gb":10}
     */
    properties?: object | null;
}
export interface EventInput {
    event: EventInputObject;
}
export interface EventCreated {
    event: EventObject & {
        /**
         * The value will always be null in this response as the event processing is done asynchronously
         * @example null
         */
        lago_customer_id?: null;
    };
}
export interface EventBatchInput {
    events: EventInputObject[];
}
export interface EventsCreated {
    events: (EventObject & {
        /**
         * The value will always be null in this response as the event processing is done asynchronously
         * @example null
         */
        lago_customer_id?: null;
    })[];
}
export interface EventEstimateFeesInput {
    event: {
        /**
         * The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.
         * @example "storage"
         */
        code: string;
        /**
         * The unique identifier of the subscription within your application.
         * @example "sub_1234567890"
         */
        external_subscription_id: string;
        /** This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required. */
        properties?: object;
    };
}
export interface Fees {
    fees: FeeObject[];
}
export interface EventEstimateInstantFeesInput {
    event: {
        /**
         * The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.
         * @example "storage"
         */
        code: string;
        /**
         * The unique identifier of the subscription within your application.
         * @example "sub_1234567890"
         */
        external_subscription_id: string;
        /** This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required. */
        properties?: object;
        /**
         * This field represents a unique identifier for the event.
         * @example "transaction_1234567890"
         */
        transaction_id?: string | null;
    };
}
export interface FeeEstimateObject {
    lago_id?: null;
    /**
     * Unique identifier assigned to the charge that the fee belongs to
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_charge_id?: string;
    /**
     * Unique identifier assigned to the charge filter that the fee belongs to
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_charge_filter_id?: string | null;
    lago_invoice_id?: null;
    lago_true_up_fee_id?: null;
    lago_true_up_parent_fee_id?: null;
    /**
     * Unique identifier assigned to the subscription, created by Lago. This field is specifically displayed when the fee type is charge or subscription.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_subscription_id?: string;
    /**
     * Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge or subscription.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id?: string;
    /**
     * Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge or subscription.
     * @example "external_id"
     */
    external_customer_id?: string;
    /**
     * Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge or subscription.
     * @example "external_id"
     */
    external_subscription_id?: string;
    /**
     * The cost of this specific fee, excluding any applicable taxes.
     * @example 100
     */
    amount_cents: number;
    /**
     * The cost of this specific fee, excluding any applicable taxes, with precision.
     * @example 1.0001
     */
    precise_amount?: number;
    /**
     * The cost of this specific fee, including any applicable taxes, with precision.
     * @example 1.0212
     */
    precise_total_amount?: number;
    /**
     * The currency of this specific fee. It indicates the monetary unit in which the fee's cost is expressed.
     * @example "EUR"
     */
    amount_currency: Currency;
    /**
     * The cost of the tax associated with this specific fee.
     * @example 0
     */
    taxes_amount_cents: number;
    /**
     * The cost of the tax associated with this specific fee, with precision.
     * @example 0
     */
    taxes_precise_amount?: number;
    /**
     * The tax rate associated with this specific fee.
     * @example 20
     */
    taxes_rate: number;
    /**
     * The number of units used to charge the customer. This field indicates the quantity or count of units consumed or utilized in the context of the charge. It helps in determining the basis for calculating the fee or cost associated with the usage of the service or product provided to the customer.
     * @example "0.32"
     */
    units: string;
    description?: null;
    /**
     * The unit amount of the fee per unit, with precision.
     * @example 312.5
     */
    precise_unit_amount: number;
    /**
     * The coupon amount applied to the estimated instant fee. It will always returns 0
     * @example "0.0"
     */
    precise_coupons_amount_cents?: string;
    /**
     * The cost of this specific fee, including any applicable taxes.
     * @example 120
     */
    total_amount_cents: number;
    /**
     * The currency of this specific fee, including any applicable taxes.
     * @example "EUR"
     */
    total_amount_currency: Currency;
    /**
     * The number of events that have been sent and used to charge the customer. This field indicates the count or quantity of events that have been processed and considered in the charging process.
     * @example 1
     */
    events_count?: number;
    /**
     * Flag that indicates whether the fee was paid in advance. It serves as a boolean value, where `true` represents that the fee was paid in advance (straightaway), and `false` indicates that the fee was not paid in arrears (at the end of the period).
     * @example true
     */
    pay_in_advance: boolean;
    /**
     * Flag that indicates whether the fee was included on the invoice. It serves as a boolean value, where `true` represents that the fee was included on the invoice, and `false` indicates that the fee was not included on the invoice.
     * @example true
     */
    invoiceable: boolean;
    /**
     * Indicates the payment status of the fee. It represents the current status of the payment associated with the fee. The value will always `pending`.
     * @example "pending"
     */
    payment_status: "pending";
    created_at?: null;
    succeeded_at?: null;
    failed_at?: null;
    refunded_at?: null;
    /**
     * Unique identifier assigned to the transaction. This field is specifically displayed when the fee type is `charge` and the payment for the fee is made in advance (`pay_in_advance` is set to `true`).
     * @example "transaction_1234567890"
     */
    event_transaction_id?: string;
    amount_details?: null;
    /** Item attached to the fee */
    item: {
        /**
         * The fee type. The value will be `charge`.
         * @example "charge"
         */
        type: "charge";
        /**
         * The code of the fee item. It will be the code of the `billable_metric`.
         * @example "startup"
         */
        code: string;
        /**
         * The name of the fee item. It will be the name of the `billable_metric`.
         * @example "Startup"
         */
        name: string;
        /**
         * The description of the fee item. It will be the name of the `billable_metric`.
         * @example "Startup description"
         */
        description?: string;
        /**
         * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
         * @example "Setup Fee (SF1)"
         */
        invoice_display_name?: string;
        /**
         * Specifies the name that will be displayed on an invoice. If no value is set for this field, the actual charge filter values will be used as the default display name.
         * @example "AWS eu-east-1"
         */
        filter_invoice_display_name?: string | null;
        /** Key value list of event properties */
        filters?: object | null;
        /**
         * Unique identifier of the fee item, created by Lago. It will be the identifier of the `billable_metric`.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_item_id: string;
        /**
         * The type of the fee item. Values is `BillableMetric`.
         * @example "BillableMetric"
         */
        item_type: "BillableMetric";
        /** Key value list of event properties aggregated by the charge model */
        grouped_by?: Record<string, string>;
    };
}
export interface FeesEstimate {
    fees: FeeEstimateObject[];
}
export interface EventBatchEstimateInstantFeesInput {
    events: EventEstimateInstantFeesInput[];
}
export interface Event {
    event: EventObject;
}
export interface FeesPaginated {
    fees: FeeObject[];
    meta: PaginationMeta;
}
export interface Fee {
    fee: FeeObject;
}
export interface FeeUpdateInput {
    fee: {
        /**
         * The payment status of the fee. Possible values are `pending`, `succeeded`, `failed` or `refunded`.
         * @example "succeeded"
         */
        payment_status: "pending" | "succeeded" | "failed" | "refunded";
    };
}
export interface InvoiceOneOffCreateInput {
    invoice: {
        /**
         * Unique identifier assigned to the customer in your application.
         * @example "hooli_1234"
         */
        external_customer_id: string;
        /**
         * The currency of the invoice.
         * @example "EUR"
         */
        currency?: Currency;
        fees: {
            /**
             * The code of the add-on used as invoice item.
             * @example "setup_fee"
             */
            add_on_code: string;
            /**
             * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
             * @example "Setup Fee (SF1)"
             */
            invoice_display_name?: string;
            /**
             * The amount of the fee per unit, expressed in cents. By default, the amount of the add-on is used.
             * @example 12000
             */
            unit_amount_cents?: number | null;
            /**
             * The quantity of units associated with the fee. By default, only 1 unit is added to the invoice.
             * @pattern ^[0-9]+.?[0-9]*$
             * @example "2.5"
             */
            units?: string | null;
            /**
             * This is a description
             * @example "The description of the fee line item in the invoice. By default, the description of the add-on is used."
             */
            description?: string | null;
            /**
             * The lower boundary of the invoice billing interval. The `from_datetime` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
             * @format date-time
             * @example "2022-08-08T00:00:00Z"
             */
            from_datetime?: string;
            /**
             * The upper boundary of the invoice billing interval. The `to_datetime` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
             * @format date-time
             * @example "2022-08-08T00:00:00Z"
             */
            to_datetime?: string;
            /** List of unique code used to identify the taxes. */
            tax_codes?: TaxCodes;
            /**
             * If true, the invoice will be created but not sent to the payment provider.
             * @default false
             * @example true
             */
            skip_psp?: boolean | null;
        }[];
        /** Configuration for invoice custom sections to apply to invoices generated by this resource. */
        invoice_custom_section?: InvoiceCustomSectionInput;
        /** Optional payment method to use for processing the invoice payment. */
        payment_method?: PaymentMethodReference;
    };
}
export type InvoiceObjectExtended = InvoiceObject & {
    credits?: CreditObject[];
    fees?: FeeObject[];
    subscriptions?: SubscriptionObject[];
    error_details?: ErrorDetailObject[];
};
export interface Invoice {
    invoice: InvoiceObjectExtended;
}
export interface InvoiceUpdateInput {
    invoice: {
        /**
         * The payment status of the invoice. Possible values are `pending`, `failed` or `succeeded`.
         * @example "succeeded"
         */
        payment_status?: "pending" | "succeeded" | "failed";
        metadata?: {
            /**
             * The metadata object identifier. Only required when updating existing metadata.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            id?: string;
            /**
             * The key in the key-value pair of the metadata.
             * @example "digital_ref_id"
             */
            key?: string;
            /**
             * The value in the key-value pair of the metadata.
             * @example "INV-0123456-98765"
             */
            value?: string;
        }[];
    };
}
/** . */
export interface InvoicePaymentUrl {
    invoice_payment_details?: {
        /**
         * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_customer_id?: string;
        /**
         * Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system
         * @example "1e501a90-1a90-1a90-1a90-1a901a901a80"
         */
        lago_invoice_id?: string;
        /**
         * The customer external unique identifier (provided by your own application)
         * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
         */
        external_customer_id?: string;
        /**
         * The Payment Provider name linked to the Customer.
         * @example "stripe"
         */
        payment_provider?: string;
        /**
         * The generated Payment URL for the Invoice.
         * @example "https://foo.bar"
         */
        payment_url?: string;
    };
}
export interface InvoicePreviewInput {
    customer: {
        /**
         * The first line of the billing address
         * @example "5230 Penfield Ave"
         */
        address_line1?: string;
        /**
         * The second line of the billing address
         * @example null
         */
        address_line2?: string | null;
        /**
         * The city of the customer's billing address
         * @example "Woodland Hills"
         */
        city?: string;
        /**
         * Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
         * @example "US"
         */
        country?: Country;
        /**
         * Unique identifier assigned to the customer in your application.
         * @example "hooli_1234"
         */
        external_id?: string;
        integration_customers?: {
            /**
             * The integration type used for accounting and tax syncs.
             * Accepted values: `anrok`.
             * @example "anrok"
             */
            integration_type: "anrok";
            /**
             * Unique code used to identify an integration connection.
             * @example "anrok1"
             */
            integration_code: string;
        }[];
        /**
         * The full name of the customer
         * @example "Gavin Belson"
         */
        name?: string;
        /**
         * The currency of the invoice.
         * @example "EUR"
         */
        currency?: Currency;
        /** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
        shipping_address?: Address;
        /**
         * The state of the customer's billing address
         * @example "CA"
         */
        state?: string;
        /**
         * The tax identification number of the customer
         * @example "EU123456789"
         */
        tax_identification_number?: string;
        /** The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone */
        timezone?: Timezone;
    };
    /**
     * The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.
     * @example "startup"
     */
    plan_code?: string;
    /**
     * The anniversary date and time of the initial subscription. This date serves as the basis for billing subscriptions with `anniversary` billing time. The `anniversary_date` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-08-08T00:00:00Z"
     */
    subscription_at?: string;
    /**
     * The billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration).
     * @example "anniversary"
     */
    billing_time?: "calendar" | "anniversary";
    coupons?: {
        /**
         * The name of the coupon.
         * @example "Startup Deal"
         */
        name?: string;
        /**
         * Unique code used to identify the coupon.
         * @example "startup_deal"
         */
        code: string;
        /**
         * The type of the coupon. It can have two possible values: `fixed_amount` or `percentage`.
         *
         * - If set to `fixed_amount`, the coupon represents a fixed amount discount.
         * - If set to `percentage`, the coupon represents a percentage-based discount.
         * @example "fixed_amount"
         */
        coupon_type?: "fixed_amount" | "percentage";
        /**
         * The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type.
         * @example 5000
         */
        amount_cents?: number | null;
        /**
         * The currency of the coupon. This field is required only for coupon with `fixed_amount` type.
         * @example "USD"
         */
        amount_currency?: CurrencyOrNull;
        /**
         * The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.
         * @pattern ^[0-9]+.?[0-9]*$
         */
        percentage_rate?: string | null;
        /**
         * Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type
         * @example 6
         */
        frequency_duration?: number | null;
    }[];
    subscriptions?: {
        external_ids: string[];
        /**
         * The code of the plan. It serves as a unique identifier associated with the new plan to which the customer is upgrading or downgrading.
         * @example "new_code"
         */
        plan_code?: string;
        /**
         * The date and time when the subscription is terminated. It should defined in the future.
         * @format date-time
         * @example "2022-08-08T00:00:00Z"
         */
        terminated_at?: string;
    };
    /**
     * The code of the billing entity to which will be associated a customer if the external_id is not provided. If billing_entity_code is not provided, default billing_entity of organization will be used.
     * @example "acme_corp"
     */
    billing_entity_code?: string;
}
/** Parameters available when voiding an invoice that optionally generate credit notes. */
export interface InvoiceVoidInput {
    /**
     * Set to `true` to force voiding the invoice and generate a credit note.
     * @example true
     */
    generate_credit_note?: boolean;
    /**
     * Portion of the invoice amount (in cents) to be refunded to the customer in the generated credit note.
     * @min 0
     * @example 2000
     */
    refund_amount?: number;
    /**
     * Portion of the invoice amount (in cents) to be credited to the customer's balance in the generated credit note.
     * @min 0
     * @example 1150
     */
    credit_amount?: number;
}
/** The custom billing settings for your organization. */
export interface OrganizationBillingConfiguration {
    /**
     * The customer invoice message that appears at the bottom of each billing documents.
     * @example "This is my customer footer"
     */
    invoice_footer?: string | null;
    /**
     * The grace period, expressed in days, for finalizing the invoice. This period refers to the additional time granted to your customers beyond the invoice due date to adjust usage and line items. Can be overwritten by the customer's grace period.
     * @example 3
     */
    invoice_grace_period?: number;
    /**
     * The locale of the billing documents, expressed in the ISO 639-1 format. This field indicates the language or regional variant used for the documents content issued or the embeddable customer portal.
     * @example "en"
     */
    document_locale?: string;
}
export interface OrganizationUpdateInput {
    organization: {
        /**
         * The URL of your newest updated webhook endpoint. This URL allows your organization to receive important messages, notifications, or data from the Lago system. By configuring your webhook endpoint to this URL, you can ensure that your organization stays informed and receives relevant information in a timely manner.
         * @example "https://webhook.brex.com"
         */
        webhook_url?: string | null;
        /**
         * The country of your organization.
         * @example "US"
         */
        country?: CountryOrNull;
        /**
         * The default currency of an organization.
         * @example "USD"
         */
        default_currency?: Currency;
        /**
         * The first line of your organization's billing address.
         * @example "100 Brex Street"
         */
        address_line1?: string | null;
        /**
         * The second line of your organization's billing address.
         * @example null
         */
        address_line2?: string | null;
        /**
         * The state of your organization's billing address.
         * @example "NYC"
         */
        state?: string | null;
        /**
         * The zipcode of your organization's billing address.
         * @example "10000"
         */
        zipcode?: string | null;
        /**
         * The email address of your organization used to bill your customers.
         * @format email
         * @example "brex@brex.com"
         */
        email?: string | null;
        /**
         * The city of your organization's billing address.
         * @example "New York"
         */
        city?: string | null;
        /**
         * The legal name of your organization.
         * @example null
         */
        legal_name?: string | null;
        /**
         * The legal number of your organization.
         * @example null
         */
        legal_number?: string | null;
        /**
         * This parameter configures the method of incrementing invoice numbers for your customers.
         *
         * - `per_customer`: Invoice numbers are incremented individually for each customer. This means every customer will have their own unique sequence of invoice numbers, separate from other customers. It ensures that each customer's invoice numbers follow a distinct and isolated numbering pattern.
         * - `per_organization`: Invoice number incrementation is made across your entire organization. Rather than individual sequences for each customer, all invoices within the organization follow a single, unified numbering system. This creates a continuous and organization-wide sequence for all invoice numbers. Invoices are incremented per month (dynamic value used is YYYYMM), and invoice numbers are reset at the end of each month.
         *
         * The default value for `document_numbering` is set to `per_customer`, meaning that, unless changed, invoice numbers will increment uniquely for each customer.
         * @example "per_customer"
         */
        document_numbering?: "per_customer" | "per_organization";
        /**
         * Sets the prefix for invoices and credit notes. Default is the first three letters of your organization name plus the last four digits of your organization ID. Customizable within 1-10 characters, and automatically capitalized by Lago.
         * @example "ORG-1234"
         */
        document_number_prefix?: string;
        /**
         * The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
         * @example 30
         */
        net_payment_term?: number;
        /**
         * The tax identification number of your organization.
         * @example "US123456789"
         */
        tax_identification_number?: string | null;
        /**
         * Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone.
         * @example "America/New_York"
         */
        timezone?: Timezone;
        /**
         * Represents the email settings of the organization. It allows you to define which documents are sent by email. The field value determines the types of documents that trigger email notifications. Possible values for are `invoice.finalized` and `credit_note.created`. By configuring this field, you can specify whether invoices, credit notes, or both should be sent to recipients via email.
         * @example ["invoice.finalized","credit_note.created"]
         */
        email_settings?: ("invoice.finalized" | "credit_note.created")[];
        /** The custom billing settings for your organization. */
        billing_configuration?: OrganizationBillingConfiguration;
        /**
         * Determines whether invoices with a zero total amount should be finalized. If set to true, zero amount invoices will be finalized. If set to false, zero amount invoices will not be finalized.
         * @example false
         */
        finalize_zero_amount_invoice?: boolean;
    };
}
export interface OrganizationObject {
    /**
     * Unique identifier assigned to the organization within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the organization's record within the Lago system
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The name of your organization.
     * @example "Name1"
     */
    name: string;
    /**
     * The date of creation of your organization, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-05-02T13:04:09Z"
     */
    created_at: string | null;
    /**
     * The URL of your newest updated webhook endpoint. This URL allows your organization to receive important messages, notifications, or data from the Lago system. By configuring your webhook endpoint to this URL, you can ensure that your organization stays informed and receives relevant information in a timely manner.
     * @example "https://webhook.brex.com"
     */
    webhook_url?: string | null;
    /**
     * The array containing your webhooks URLs.
     * @example ["https://webhook.brex.com","https://webhook2.brex.com"]
     */
    webhook_urls?: any[] | null;
    /**
     * The country of your organization.
     * @example "US"
     */
    country?: CountryOrNull;
    /**
     * The default currency of an organization.
     * @example "USD"
     */
    default_currency?: Currency;
    /**
     * The first line of your organization's billing address.
     * @example "100 Brex Street"
     */
    address_line1?: string | null;
    /**
     * The second line of your organization's billing address.
     * @example null
     */
    address_line2?: string | null;
    /**
     * The state of your organization's billing address.
     * @example "NYC"
     */
    state?: string | null;
    /**
     * The zipcode of your organization's billing address.
     * @example "10000"
     */
    zipcode?: string | null;
    /**
     * The email address of your organization used to bill your customers.
     * @format email
     * @example "brex@brex.com"
     */
    email?: string | null;
    /**
     * The city of your organization's billing address.
     * @example "New York"
     */
    city?: string | null;
    /**
     * The legal name of your organization.
     * @example null
     */
    legal_name?: string | null;
    /**
     * The legal number of your organization.
     * @example null
     */
    legal_number?: string | null;
    /**
     * This parameter configures the method of incrementing invoice numbers for your customers.
     *
     * - `per_customer`: Invoice numbers are incremented individually for each customer. This means every customer will have their own unique sequence of invoice numbers, separate from other customers. It ensures that each customer's invoice numbers follow a distinct and isolated numbering pattern.
     * - `per_organization`: Invoice number incrementation is made across your entire organization. Rather than individual sequences for each customer, all invoices within the organization follow a single, unified numbering system. This creates a continuous and organization-wide sequence for all invoice numbers. Invoices are incremented per month (dynamic value used is YYYYMM), and invoice numbers are reset at the end of each month.
     *
     * The default value for `document_numbering` is set to `per_customer`, meaning that, unless changed, invoice numbers will increment uniquely for each customer.
     * @example "per_customer"
     */
    document_numbering: "per_customer" | "per_organization";
    /**
     * Sets the prefix for invoices and credit notes. Default is the first three letters of your organization name plus the last four digits of your organization ID. Customizable within 1-10 characters, and automatically capitalized by Lago.
     * @example "ORG-1234"
     */
    document_number_prefix: string;
    /**
     * The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
     * @example 30
     */
    net_payment_term?: number;
    /**
     * The tax identification number of your organization.
     * @example "US123456789"
     */
    tax_identification_number?: string | null;
    /**
     * Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone.
     * @example "America/New_York"
     */
    timezone?: Timezone;
    /** The custom billing settings for your organization. */
    billing_configuration: OrganizationBillingConfiguration;
    /** List of default organization taxes */
    taxes?: TaxObject[];
    /**
     * Indicates whether invoices with a zero total amount should be finalized. If set to true, zero amount invoices will be finalized. If set to false, zero amount invoices will not be finalized.
     * @example false
     */
    finalize_zero_amount_invoice?: boolean;
}
export interface Organization {
    organization: OrganizationObject;
}
export interface PaymentReceiptObject {
    /**
     * Unique identifier of the payment receipt, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The date and time when the payment receipt was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the payment receipt was initially created.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /**
     * The unique number assigned to the payment receipt.
     * @example "LAG-1234-001-002"
     */
    number: string;
    payment: PaymentObject;
}
export interface PaymentReceiptsPaginated {
    payment_receipts: PaymentReceiptObject[];
    meta: PaginationMeta;
}
export interface PaymentReceipt {
    payment_receipt: PaymentReceiptObject;
}
export interface PaymentRequestCreateInput {
    payment_request: {
        /**
         * The customer external unique identifier (provided by your own application)
         * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
         */
        external_customer_id: string;
        /**
         * The customer's email address used for sending dunning notifications
         * @format email
         * @example "dinesh@piedpiper.test"
         */
        email: string;
        /** A list of Lago IDs for the customer's overdue invoices to start the dunning process */
        lago_invoice_ids: string[];
        /** Optional payment method to use for processing the payment request. */
        payment_method?: PaymentMethodReference;
    };
}
export interface PaymentRequest {
    payment_request: PaymentRequestObject;
}
export interface PaymentCreateInput {
    payment: {
        /**
         * Unique identifier assigned to the invoice
         * @example "486b147a-02a1-4ccf-8603-f3541fc25e7a"
         */
        invoice_id: string;
        /**
         * The payment amount in cents
         * @example 100
         */
        amount_cents: number;
        /**
         * Reference for the payment
         * @example "ref1"
         */
        reference: string;
        /**
         * The date the payment was made
         * @format date
         * @example "2025-02-20"
         */
        paid_at?: string;
    };
}
export interface Payment {
    payment: PaymentObject;
}
export interface MinimumCommitmentObject {
    /**
     * Unique identifier of the minimum commitment, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The unique code representing the plan to be attached to the customer.
     * @example "premium"
     */
    plan_code?: string;
    /**
     * The amount of the minimum commitment in cents.
     * @example 100000
     */
    amount_cents: number;
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.
     * @example "Minimum Commitment (C1)"
     */
    invoice_display_name?: string;
    /**
     * The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `semiannual`, `quarterly`, `monthly` or `weekly`.
     * @example "monthly"
     */
    interval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly";
    /**
     * The date and time when the minimum commitment was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the minimum commitment was initially created.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /**
     * The date and time when the minimum commitment was updated. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the minimum commitment was initially created.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    updated_at?: string;
    /** All taxes applied to the minimum commitment. */
    taxes?: TaxObject[];
}
/**
 * Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:
 *   - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)
 *   - [`graduated_percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated-percentage)
 *   - [`graduated`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated)
 *   - [`package`](https://docs.getlago.com/guide/plans/charges/charge-models/package)
 *   - [`percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/percentage)
 *   - [`standard`](https://docs.getlago.com/guide/plans/charges/charge-models/standard)
 *   - [`volume`](https://docs.getlago.com/guide/plans/charges/charge-models/volume)
 */
export type ChargeModelEnum = "dynamic" | "graduated" | "graduated_percentage" | "package" | "percentage" | "standard" | "volume";
export interface ChargeProperties {
    /**
     * The list of event properties that are used to group the events on the invoice for a `standard` charge model.
     * **DEPRECATED** Replaced by `pricing_group_keys`.
     * @deprecated
     * @example ["agent_name"]
     */
    grouped_by?: string[];
    /**
     * The list of event properties that are used to group the events on the invoice.
     * @example ["agent_name"]
     */
    pricing_group_keys?: string[];
    /** Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model. */
    graduated_ranges?: {
        /**
         * Specifies the lower value of a tier for a `graduated` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.
         * @example 0
         */
        from_value: number;
        /**
         * Specifies the highest value of a tier for a `graduated` charge model.
         * - This value must be higher than the from_value of the same tier.
         * - This value must be null for the last tier.
         * @example 10
         */
        to_value: number | null;
        /**
         * The flat amount for a whole tier, excluding tax, for a `graduated` charge model. It is expressed as a decimal value.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "10"
         */
        flat_amount: string;
        /**
         * The unit price, excluding tax, for a specific tier of a `graduated` charge model. It is expressed as a decimal value.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "0.5"
         */
        per_unit_amount: string;
    }[];
    /** Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model. */
    graduated_percentage_ranges?: {
        /**
         * Specifies the lower value of a tier for a `graduated_percentage` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.
         * @example 0
         */
        from_value: number;
        /**
         * Specifies the highest value of a tier for a `graduated_percentage` charge model.
         * - This value must be higher than the from_value of the same tier.
         * - This value must be null for the last tier.
         * @example 10
         */
        to_value: number | null;
        /**
         * The percentage rate that is applied to the amount of each transaction in the tier for a `graduated_percentage` charge model. It is expressed as a decimal value.
         * @format ^[0-9]+.?[0-9]*$
         * @example "1"
         */
        rate: string;
        /**
         * The flat amount for a whole tier, excluding tax, for a `graduated_percentage` charge model. It is expressed as a decimal value.
         * @format ^[0-9]+.?[0-9]*$
         * @example "10"
         */
        flat_amount: string;
    }[];
    /**
     * - The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.
     * - The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "30"
     */
    amount?: string;
    /**
     * The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.
     * @example 100
     */
    free_units?: number;
    /**
     * The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.
     * @example 1000
     */
    package_size?: number;
    /**
     * The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "1"
     */
    rate?: string;
    /**
     * The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "0.5"
     */
    fixed_amount?: string;
    /**
     * The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.
     * @example 5
     */
    free_units_per_events?: number | null;
    /**
     * The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "500"
     */
    free_units_per_total_aggregation?: string | null;
    /**
     * Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.
     * @format ^[0-9]+.?[0-9]*$
     * @example "3.75"
     */
    per_transaction_max_amount?: string | null;
    /**
     * Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.
     * @format ^[0-9]+.?[0-9]*$
     * @example "1.75"
     */
    per_transaction_min_amount?: string | null;
    /** Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model. */
    volume_ranges?: {
        /**
         * Specifies the lower value of a tier for a `volume` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.
         * @example 0
         */
        from_value: number;
        /**
         * Specifies the highest value of a tier for a `volume` charge model.
         * - This value must be higher than the `from_value` of the same tier.
         * - This value must be `null` for the last tier.
         * @example 10
         */
        to_value: number | null;
        /**
         * The flat amount for a whole tier, excluding tax, for a `volume` charge model. It is expressed as a decimal value.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "10"
         */
        flat_amount: string;
        /**
         * The unit price, excluding tax, for a specific tier of a `volume` charge model. It is expressed as a decimal value.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "0.5"
         */
        per_unit_amount: string;
    }[];
}
/** Values used to apply differentiated pricing based on additional event properties. */
export interface ChargeFilterObject {
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.
     * @example "AWS"
     */
    invoice_display_name: string | null;
    /** List of all thresholds utilized for calculating the charge. */
    properties: ChargeProperties;
    /**
     * List of possible filter values. The key and values must match one of the billable metric filters.
     * @example {"region":["us-east-1"]}
     */
    values: Record<string, string[]>;
}
export interface ChargeObject {
    /**
     * Unique identifier of charge, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Unique identifier of the billable metric created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_billable_metric_id: string;
    /**
     * Unique code identifying the charge within the plan.
     * @example "api_requests_charge"
     */
    code?: string | null;
    /**
     * Unique code identifying a billable metric.
     * @example "requests"
     */
    billable_metric_code: string;
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
     * @example "Setup"
     */
    invoice_display_name?: string | null;
    /**
     * The date and time when the charge was created. It is expressed in UTC format according to the ISO 8601 datetime standard.
     * @format date-time
     * @example "2022-09-14T16:35:31Z"
     */
    created_at: string;
    /**
     * Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:
     *   - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)
     *   - [`graduated_percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated-percentage)
     *   - [`graduated`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated)
     *   - [`package`](https://docs.getlago.com/guide/plans/charges/charge-models/package)
     *   - [`percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/percentage)
     *   - [`standard`](https://docs.getlago.com/guide/plans/charges/charge-models/standard)
     *   - [`volume`](https://docs.getlago.com/guide/plans/charges/charge-models/volume)
     */
    charge_model: ChargeModelEnum;
    /**
     * This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to `false`, the charge is due and invoiced at the end of each billing period.
     * @example true
     */
    pay_in_advance: boolean;
    /**
     * This field specifies whether the charge should be included in a proper invoice. If set to `false`, no invoice will be issued for this charge. You can only set it to `false` when `pay_in_advance` is `true`.
     * @example true
     */
    invoiceable: boolean;
    /**
     * This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
     * This field determines whether and when the charge fee should be included in
     * the invoice. If `null`, no invoice will be issued for this charge fee.
     * If `invoice`, an invoice will be generated at the end of the period,
     * consolidating all charge fees with a succeeded payment status.
     * @example "invoice"
     */
    regroup_paid_fees: "invoice";
    /**
     * Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
     *
     * - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
     * - If set to `false`, the charge is billed in full.
     * - If not defined in the request, default value is `false`.
     * @example false
     */
    prorated: boolean;
    /**
     * The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.
     * @example 1200
     */
    min_amount_cents: number;
    /** List of all thresholds utilized for calculating the charge. */
    properties: ChargeProperties;
    /** List of filters used to apply differentiated pricing based on additional event properties. */
    filters: ChargeFilterObject[];
    /** All taxes applied to the charge. */
    taxes?: TaxObject[];
    /** The pricing unit applied to the charge. */
    applied_pricing_unit?: {
        /**
         * The code of the pricing unit.
         * @example "unit_code"
         */
        code: string;
        /**
         * The conversion rate from pricing units to the plan's currency.
         * @example "0.5"
         */
        conversion_rate: string;
    };
    /**
     * Specifies whether the charge accepts a target wallet for prepaid credits deduction.
     * @example false
     */
    accepts_target_wallet?: boolean | null;
    /**
     * Unique identifier of the parent charge (if this is an override).
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_parent_id?: string | null;
}
export interface FixedChargeProperties {
    /**
     * - The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.
     * - The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "30"
     */
    amount?: string;
    /** Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model. */
    graduated_ranges?: {
        /**
         * Specifies the lower value of a tier for a `graduated` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.
         * @example 0
         */
        from_value: number;
        /**
         * Specifies the highest value of a tier for a `graduated` charge model.
         * - This value must be higher than the from_value of the same tier.
         * - This value must be null for the last tier.
         * @example 10
         */
        to_value: number | null;
        /**
         * The flat amount for a whole tier, excluding tax, for a `graduated` charge model. It is expressed as a decimal value.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "10"
         */
        flat_amount: string;
        /**
         * The unit price, excluding tax, for a specific tier of a `graduated` charge model. It is expressed as a decimal value.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "0.5"
         */
        per_unit_amount: string;
    }[];
    /** Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model. */
    volume_ranges?: {
        /**
         * Specifies the lower value of a tier for a `volume` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.
         * @example 0
         */
        from_value: number;
        /**
         * Specifies the highest value of a tier for a `volume` charge model.
         * - This value must be higher than the `from_value` of the same tier.
         * - This value must be `null` for the last tier.
         * @example 10
         */
        to_value: number | null;
        /**
         * The flat amount for a whole tier, excluding tax, for a `volume` charge model. It is expressed as a decimal value.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "10"
         */
        flat_amount: string;
        /**
         * The unit price, excluding tax, for a specific tier of a `volume` charge model. It is expressed as a decimal value.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "0.5"
         */
        per_unit_amount: string;
    }[];
}
export interface FixedChargeObject {
    /**
     * Unique identifier of the fixed charge, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Unique identifier of the add-on associated with this fixed charge.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_add_on_id: string;
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
     * @example "Setup fee"
     */
    invoice_display_name: string;
    /**
     * Unique code used to identify the add-on.
     * @example "setup_fee"
     */
    add_on_code: string;
    /**
     * The date and time when the fixed charge was created. It is expressed in UTC format according to the ISO 8601 datetime standard.
     * @format date-time
     * @example "2023-06-27T19:43:42Z"
     */
    created_at: string;
    /**
     * Unique code for the fixed charge.
     * @example "setup_fee"
     */
    code: string;
    /**
     * The charge model for the fixed charge. Only `standard`, `graduated`, and `volume` models are supported for fixed charges.
     * @example "standard"
     */
    charge_model: "standard" | "graduated" | "volume";
    /**
     * This field determines the billing timing for this fixed charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period.
     * @example false
     */
    pay_in_advance: boolean;
    /**
     * Specifies whether a fixed charge is prorated based on the remaining number of days in the billing period or billed fully.
     *
     * - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
     * - If set to `false`, the charge is billed in full.
     * - If not defined in the request, default value is `false`.
     * @example false
     */
    prorated: boolean;
    /** List of all thresholds utilized for calculating the fixed charge. */
    properties: FixedChargeProperties;
    /**
     * The number of units for the fixed charge.
     * @example 1
     */
    units: number;
    /**
     * Unique identifier of the parent fixed charge (for plan versions).
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_parent_id?: string | null;
    /** List of taxes applied to the fixed charge. */
    taxes?: TaxObject[];
}
export type PlanEntitlementPrivilegeObject = FeaturePrivilegeObject & {
    /**
     * Value assigned to this privilege in the entitlement. Type depends on the privilege's value_type.
     * @example 10
     */
    value: number | boolean | string;
};
export interface PlanEntitlementObject {
    /**
     * Unique code used to identify the feature. Max 255 characters.
     * @example "seats"
     */
    code: string;
    /**
     * Name of the feature. Max 255 characters.
     * @example "Number of seats"
     */
    name: string | null;
    /**
     * Description of the feature. Max 600 characters.
     * @example "Number of users of the account"
     */
    description: string | null;
    /**
     * Privileges associated with this feature. Each privilege must have a value assigned.
     * @example [{"code":"max","name":"Maximum","value_type":"integer","config":{},"value":10},{"code":"max_admins","name":"Max Admins","value_type":"integer","config":{},"value":5},{"code":"root","name":"Allow root user","value_type":"boolean","config":{},"value":true},{"code":"provider","name":"SSO Provider","value_type":"select","value":"google","config":{"select_options":["google","okta"]}}]
     */
    privileges: PlanEntitlementPrivilegeObject[];
}
export interface PlanEntitlement {
    entitlement: PlanEntitlementObject;
}
export interface PlanObject {
    /**
     * Unique identifier of the plan created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The name of the plan.
     * @example "Startup"
     */
    name: string;
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.
     * @example "Startup plan"
     */
    invoice_display_name?: string;
    /**
     * The date and time when the plan was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the plan was initially created.
     * @format date-time
     * @example "2023-06-27T19:43:42Z"
     */
    created_at: string;
    /**
     * The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.
     * @example "startup"
     */
    code: string;
    /**
     * The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `semiannual`, `quarterly`, `monthly` or `weekly`.
     * @example "monthly"
     */
    interval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly";
    /**
     * The description on the plan.
     * @example ""
     */
    description?: string;
    /**
     * The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.
     * @example 10000
     */
    amount_cents: number;
    /**
     * The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.
     * @example "USD"
     */
    amount_currency: Currency;
    /**
     * The duration in days during which the base cost of the plan is offered for free.
     * @example 5
     */
    trial_period?: number;
    /**
     * This field determines the billing timing for the plan. When set to `true`, the base cost of the plan is due at the beginning of each billing period. Conversely, when set to `false`, the base cost of the plan is due at the end of each billing period.
     * @example true
     */
    pay_in_advance?: boolean;
    /**
     * This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is yearly or semiannual. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.
     * @example null
     */
    bill_charges_monthly?: boolean | null;
    /**
     * This field, when set to `true`, enables to invoice fixed charges on monthly basis, even if the cadence of the plan is yearly or semiannual. This allows customers to pay fixed charges on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.
     * @example null
     */
    bill_fixed_charges_monthly?: boolean | null;
    minimum_commitment?: MinimumCommitmentObject;
    /**
     * Additional usage-based charges for this plan.
     * @example [{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","billable_metric_code":"requests","created_at":"2023-06-27T19:43:42Z","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","billable_metric_code":"cpu","created_at":"2023-06-27T19:43:42Z","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"flat_amount":"10","per_unit_amount":"0.5"},{"from_value":11,"to_value":null,"flat_amount":"0","per_unit_amount":"0.4"}]},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","billable_metric_code":"seats","created_at":"2023-06-27T19:43:42Z","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":0,"properties":{},"filters":[{"invoice_display_name":"Europe","properties":{"amount":"10"},"values":{"region":["Europe"]}},{"invoice_display_name":"USA","properties":{"amount":"5"},"values":{"region":["USA"]}},{"invoice_display_name":"Africa","properties":{"amount":"8"},"values":{"region":["Africa"]}}]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","billable_metric_code":"storage","created_at":"2023-06-27T19:43:42Z","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","billable_metric_code":"payments","created_at":"2023-06-27T19:43:42Z","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":"invoice","prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"filters":[]}]
     */
    charges?: ChargeObject[];
    /**
     * List of fixed charges for this plan.
     * @example [{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","lago_add_on_id":"2b802b80-2b80-2b80-2b80-2b802b802b80","code":"setup_fee","invoice_display_name":"Setup Fee","add_on_code":"setup","created_at":"2026-01-15T10:30:00Z","charge_model":"standard","pay_in_advance":true,"prorated":false,"properties":{"amount":"500"},"units":1,"lago_parent_id":null,"taxes":[{"lago_id":"3c703c70-3c70-3c70-3c70-3c703c703c70","name":"VAT","code":"vat_20","rate":20,"description":"Standard VAT rate","applied_to_organization":true,"created_at":"2026-01-01T00:00:00Z"}]},{"lago_id":"4d604d60-4d60-4d60-4d60-4d604d604d60","lago_add_on_id":"5e505e50-5e50-5e50-5e50-5e505e505e50","code":"support_tier","invoice_display_name":"Support Tier","add_on_code":"premium_support","created_at":"2026-01-15T10:30:00Z","charge_model":"graduated","pay_in_advance":false,"prorated":true,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"per_unit_amount":"5","flat_amount":"200"},{"from_value":11,"to_value":null,"per_unit_amount":"1","flat_amount":"300"}]},"units":1,"lago_parent_id":null,"taxes":[]},{"lago_id":"6f406f40-6f40-6f40-6f40-6f406f406f40","lago_add_on_id":"7a307a30-7a30-7a30-7a30-7a307a307a30","code":"storage","invoice_display_name":"Storage Allocation","add_on_code":"cloud_storage","created_at":"2026-01-15T10:30:00Z","charge_model":"volume","pay_in_advance":false,"prorated":false,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"per_unit_amount":"2","flat_amount":"1"},{"from_value":101,"to_value":null,"per_unit_amount":"1","flat_amount":"0"}]},"units":50,"lago_parent_id":null,"taxes":[]}]
     */
    fixed_charges?: FixedChargeObject[];
    /** All taxes applied to the plan. */
    taxes?: TaxObject[];
    /** List of usage thresholds applied to the plan. */
    usage_thresholds?: UsageThresholdObject[];
    /** List of all feature entitlements and their privileges available for this plan. */
    entitlements?: PlanEntitlement[];
    /**
     * Custom metadata stored as key-value pairs.
     * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
     */
    metadata?: MetadataObject;
}
export interface PlansPaginated {
    plans: PlanObject[];
    meta: PaginationMeta;
}
/** Minimum commitment for this plan. */
export interface MinimumCommitmentInput {
    /**
     * The amount of the minimum commitment in cents.
     * @example 100000
     */
    amount_cents: number;
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.
     * @example "Minimum Commitment (C1)"
     */
    invoice_display_name?: string;
    /** List of unique code used to identify the taxes. */
    tax_codes?: TaxCodes;
}
/** Values used to apply differentiated pricing based on additional event properties. */
export interface ChargeFilterInput {
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.
     * @example "AWS"
     */
    invoice_display_name?: string | null;
    /** List of all thresholds utilized for calculating the charge. */
    properties: ChargeProperties;
    /**
     * List of possible filter values. The key and values must match one of the billable metric filters.
     * @example {"region":["us-east-1"]}
     */
    values: Record<string, string[]>;
}
export interface UsageThresholdInput {
    /**
     * The display name of the usage threshold.
     * @example "Threshold 1"
     */
    threshold_display_name?: string | null;
    /**
     * The amount to reach to trigger a `progressive_billing` invoice.
     * @example 10000
     */
    amount_cents: number;
    /**
     * This field when set to `true` indicates that a `progressive_billing` invoice will be created every time the lifetime usage increases by the specified amount.
     * @default false
     * @example true
     */
    recurring?: boolean;
}
export interface PlanCreateInput {
    plan: {
        /**
         * The name of the plan.
         * @example "Startup"
         */
        name: string;
        /**
         * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.
         * @example "Startup plan"
         */
        invoice_display_name?: string | null;
        /**
         * The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.
         * @example "startup"
         */
        code: string;
        /**
         * The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `semiannual`, `quarterly`, `monthly`, or `weekly`.
         * @example "monthly"
         */
        interval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly";
        /**
         * The description on the plan.
         * @example "Plan for early stage startups."
         */
        description?: string | null;
        /**
         * The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.
         * @example 10000
         */
        amount_cents: number;
        /**
         * The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.
         * @example "USD"
         */
        amount_currency: Currency;
        /**
         * The duration in days during which the base cost of the plan is offered for free.
         * @example 5
         */
        trial_period?: number | null;
        /**
         * This field determines the billing timing for the plan. When set to `true`, the base cost of the plan is due at the beginning of each billing period. Conversely, when set to `false`, the base cost of the plan is due at the end of each billing period.
         * @example true
         */
        pay_in_advance: boolean;
        /**
         * This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is `yearly` or `semiannual`. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.
         * @example null
         */
        bill_charges_monthly?: boolean | null;
        /**
         * This field, when set to `true`, enables to invoice fixed charges on monthly basis, even if the cadence of the plan is `yearly` or `semiannual`. This allows customers to pay fixed charges on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.
         * @example null
         */
        bill_fixed_charges_monthly?: boolean | null;
        /** List of unique code used to identify the taxes. */
        tax_codes?: TaxCodes;
        /** Minimum commitment for this plan. */
        minimum_commitment?: MinimumCommitmentInput;
        /**
         * Additional usage-based charges for this plan.
         * @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"tax_codes":["french_standard_vat"]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":"invoice","prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"}}]
         */
        charges?: {
            /**
             * Unique identifier of the billable metric created by Lago.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            billable_metric_id: string;
            /**
             * Unique code identifying the charge within the plan.
             * @example "api_requests_charge"
             */
            code?: string;
            /**
             * Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:
             *   - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)
             *   - [`graduated_percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated-percentage)
             *   - [`graduated`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated)
             *   - [`package`](https://docs.getlago.com/guide/plans/charges/charge-models/package)
             *   - [`percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/percentage)
             *   - [`standard`](https://docs.getlago.com/guide/plans/charges/charge-models/standard)
             *   - [`volume`](https://docs.getlago.com/guide/plans/charges/charge-models/volume)
             */
            charge_model: ChargeModelEnum;
            /**
             * This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period.
             * @example false
             */
            pay_in_advance?: boolean;
            /**
             * This field specifies whether the charge should be included in a proper invoice. If set to false, no invoice will be issued for this charge. You can only set it to `false` when `pay_in_advance` is `true`.
             * @example true
             */
            invoiceable?: boolean;
            /**
             * This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
             * This field determines whether and when the charge fee should be included in
             * the invoice. If `null`, no invoice will be issued for this charge fee.
             * If `invoice`, an invoice will be generated at the end of the period,
             * consolidating all charge fees with a succeeded payment status.
             * @example "invoice"
             */
            regroup_paid_fees?: "invoice";
            /**
             * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
             * @example "Setup"
             */
            invoice_display_name?: string;
            /**
             * Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
             *
             * - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
             * - If set to `false`, the charge is billed in full.
             * - If not defined in the request, default value is `false`.
             * @example false
             */
            prorated?: boolean;
            /**
             * The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.
             * @example 0
             */
            min_amount_cents?: number;
            /** List of all thresholds utilized for calculating the charge. */
            properties?: ChargeProperties;
            /** List of filters used to apply differentiated pricing based on additional event properties. */
            filters?: ChargeFilterInput[];
            /** List of unique code used to identify the taxes. */
            tax_codes?: TaxCodes;
            /** The pricing unit to apply to the charge. */
            applied_pricing_unit?: {
                /**
                 * The code of the pricing unit.
                 * @example "credits"
                 */
                code?: string;
                /**
                 * The conversion rate from pricing units to the plan's currency.
                 * This rate determines how many currency units (in the plan's base currency) equal one pricing unit.
                 * For example, if the plan uses USD and the conversion rate is 0.5, then 1 pricing unit = $0.50.
                 * @example "0.5"
                 */
                conversion_rate?: string;
            };
            /**
             * Specifies whether the charge accepts a target wallet for prepaid credits deduction.
             * @example false
             */
            accepts_target_wallet?: boolean | null;
        }[];
        /**
         * Additional fixed charges for this plan.
         * @example [{"add_on_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","code":"setup_fee","invoice_display_name":"Setup Fee","charge_model":"standard","pay_in_advance":true,"prorated":false,"properties":{"amount":"500"},"units":1,"tax_codes":["french_standard_vat"]},{"add_on_id":"4d604d60-4d60-4d60-4d60-4d604d604d60","invoice_display_name":"Support Tier","charge_model":"graduated","pay_in_advance":false,"prorated":true,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"per_unit_amount":"5","flat_amount":"200"},{"from_value":11,"to_value":null,"per_unit_amount":"1","flat_amount":"300"}]},"units":2},{"add_on_id":"6f406f40-6f40-6f40-6f40-6f406f406f40","charge_model":"volume","properties":{"volume_ranges":[{"from_value":0,"to_value":100,"per_unit_amount":"2","flat_amount":"1"},{"from_value":101,"to_value":null,"per_unit_amount":"1","flat_amount":"0"}]},"units":50}]
         */
        fixed_charges?: {
            /**
             * Unique identifier of the add-on associated with this fixed charge.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            add_on_id: string;
            /**
             * Unique code for the fixed charge. If not provided, it will be automatically generated based on the add-on code.
             * @example "setup_fee"
             */
            code?: string;
            /**
             * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
             * @example "Setup fee"
             */
            invoice_display_name?: string;
            /**
             * The number of units for the fixed charge. Defaults to 0 if not provided.
             * @default 0
             * @example 1
             */
            units?: number;
            /**
             * The charge model for the fixed charge. Only `standard`, `graduated`, and `volume` models are supported for fixed charges.
             * @example "standard"
             */
            charge_model: "standard" | "graduated" | "volume";
            /**
             * This field determines the billing timing for this specific fixed charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period. Defaults to `false` if not provided.
             * @default false
             * @example false
             */
            pay_in_advance?: boolean;
            /**
             * Specifies whether a fixed charge is prorated based on the remaining number of days in the billing period or billed fully.
             *
             * - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
             * - If set to `false`, the charge is billed in full.
             * - Defaults to `false` if not provided.
             *
             * Note: Prorated fixed charges with `graduated` model and `pay_in_advance` are not allowed.
             * @default false
             * @example false
             */
            prorated?: boolean;
            /** List of all thresholds utilized for calculating the fixed charge. */
            properties?: FixedChargeProperties;
            /** List of taxes applied to the fixed charge. */
            tax_codes?: TaxCodes;
        }[];
        /** List of usage thresholds to apply to the plan. */
        usage_thresholds?: UsageThresholdInput[];
        /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
        metadata?: MetadataInput;
    };
}
export interface Plan {
    plan: PlanObject;
}
export interface PlanUpdateInput {
    plan: {
        /**
         * The name of the plan.
         * @example "Startup"
         */
        name?: string;
        /**
         * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.
         * @example "Startup plan"
         */
        invoice_display_name?: string | null;
        /**
         * The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.
         * @example "startup"
         */
        code?: string;
        /**
         * The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `semiannual`, `quarterly`, `monthly`, or `weekly`.
         * @example "monthly"
         */
        interval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly";
        /**
         * The description on the plan.
         * @example "Plan for early stage startups."
         */
        description?: string | null;
        /**
         * The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.
         * @example 10000
         */
        amount_cents?: number;
        /**
         * The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.
         * @example "USD"
         */
        amount_currency?: Currency;
        /**
         * The duration in days during which the base cost of the plan is offered for free.
         * @example 5
         */
        trial_period?: number | null;
        /**
         * This field determines the billing timing for the plan. When set to `true`, the base cost of the plan is due at the beginning of each billing period. Conversely, when set to `false`, the base cost of the plan is due at the end of each billing period.
         * @example true
         */
        pay_in_advance?: boolean;
        /**
         * This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is yearly or semiannual. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.
         * @example null
         */
        bill_charges_monthly?: boolean | null;
        /**
         * This field, when set to `true`, enables to invoice fixed charges on monthly basis, even if the cadence of the plan is `yearly` or `semiannual`. This allows customers to pay fixed charges on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.
         * @example null
         */
        bill_fixed_charges_monthly?: boolean | null;
        /** List of unique code used to identify the taxes. */
        tax_codes?: TaxCodes;
        /** Minimum commitment for this plan. */
        minimum_commitment?: MinimumCommitmentInput;
        /**
         * Additional usage-based charges for this plan.
         * @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"tax_codes":["french_standard_vat"]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":0,"properties":{}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":"invoice","prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"}}]
         */
        charges?: {
            /**
             * Unique identifier of the charge created by Lago.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            id?: string;
            /**
             * Unique identifier of the billable metric created by Lago.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            billable_metric_id?: string;
            /**
             * Unique code identifying the charge within the plan.
             * @example "api_requests_charge"
             */
            code?: string;
            /**
             * Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:
             *   - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)
             *   - [`graduated_percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated-percentage)
             *   - [`graduated`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated)
             *   - [`package`](https://docs.getlago.com/guide/plans/charges/charge-models/package)
             *   - [`percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/percentage)
             *   - [`standard`](https://docs.getlago.com/guide/plans/charges/charge-models/standard)
             *   - [`volume`](https://docs.getlago.com/guide/plans/charges/charge-models/volume)
             */
            charge_model?: ChargeModelEnum;
            /**
             * This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period.
             * @example false
             */
            pay_in_advance?: boolean;
            /**
             * This field specifies whether the charge should be included in a proper invoice. If set to false, no invoice will be issued for this charge. You can only set it to `false` when `pay_in_advance` is `true`.
             * @example true
             */
            invoiceable?: boolean;
            /**
             * This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
             * This field determines whether and when the charge fee should be included in
             * the invoice. If `null`, no invoice will be issued for this charge fee.
             * If `invoice`, an invoice will be generated at the end of the period,
             * consolidating all charge fees with a succeeded payment status.
             * @example "invoice"
             */
            regroup_paid_fees?: "invoice";
            /**
             * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
             * @example "Setup"
             */
            invoice_display_name?: string;
            /**
             * Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
             *
             * - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
             * - If set to `false`, the charge is billed in full.
             * - If not defined in the request, default value is `false`.
             * @example false
             */
            prorated?: boolean;
            /**
             * The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.
             * @example 0
             */
            min_amount_cents?: number;
            /** List of all thresholds utilized for calculating the charge. */
            properties?: ChargeProperties;
            /** List of filters used to apply differentiated pricing based on additional event properties. */
            filters?: ChargeFilterInput[];
            /** List of unique code used to identify the taxes. */
            tax_codes?: TaxCodes;
            /** Updates the pricing unit conversion rate for this charge. Only applies if the charge has applied pricing unit. */
            applied_pricing_unit?: {
                /**
                 * The conversion rate from pricing units to the plan's currency.
                 * This rate determines how many currency units (in the plan's base currency) equal one pricing unit.
                 * For example, if the plan uses USD and the conversion rate is 0.5, then 1 pricing unit = $0.50 USD.
                 * @example "0.5"
                 */
                conversion_rate?: string;
            };
            /**
             * Specifies whether the charge accepts a target wallet for prepaid credits deduction.
             * @example false
             */
            accepts_target_wallet?: boolean | null;
        }[];
        /**
         * Additional fixed charges for this plan.
         * @example [{"id":"1a901a90-1a90-1a90-1a90-1a901a901a90","invoice_display_name":"New Setup Fee","charge_model":"standard","apply_units_immediately":true,"units":5},{"add_on_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","code":"setup_fee","invoice_display_name":"Setup Fee","charge_model":"standard","pay_in_advance":true,"prorated":false,"properties":{"amount":"500"},"units":1,"apply_units_immediately":false,"tax_codes":["french_standard_vat"]},{"add_on_id":"4d604d60-4d60-4d60-4d60-4d604d604d60","invoice_display_name":"Support Tier","charge_model":"graduated","pay_in_advance":false,"prorated":true,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"per_unit_amount":"5","flat_amount":"200"},{"from_value":11,"to_value":null,"per_unit_amount":"1","flat_amount":"300"}]},"units":2},{"add_on_id":"6f406f40-6f40-6f40-6f40-6f406f406f40","charge_model":"volume","properties":{"volume_ranges":[{"from_value":0,"to_value":100,"per_unit_amount":"2","flat_amount":"1"},{"from_value":101,"to_value":null,"per_unit_amount":"1","flat_amount":"0"}]},"units":50}]
         */
        fixed_charges?: {
            /**
             * Unique identifier of the fixed charge created by Lago (required for updates).
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            id?: string;
            /**
             * Unique identifier of the add-on associated with this fixed charge.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            add_on_id?: string;
            /**
             * Unique code for the fixed charge. If not provided, it will be automatically generated based on the add-on code.
             * @example "setup_fee"
             */
            code?: string;
            /**
             * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
             * @example "Setup fee"
             */
            invoice_display_name?: string;
            /**
             * The number of units for the fixed charge. Defaults to 0 if not provided.
             * @default 0
             * @example 1
             */
            units?: number;
            /**
             * The charge model for the fixed charge. Only `standard`, `graduated`, and `volume` models are supported for fixed charges.
             * @example "standard"
             */
            charge_model?: "standard" | "graduated" | "volume";
            /**
             * This field determines the billing timing for this specific fixed charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period. Defaults to `false` if not provided.
             * @default false
             * @example false
             */
            pay_in_advance?: boolean;
            /**
             * Specifies whether a fixed charge is prorated based on the remaining number of days in the billing period or billed fully.
             *
             * - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
             * - If set to `false`, the charge is billed in full.
             * - Defaults to `false` if not provided.
             *
             * Note: Prorated fixed charges with `graduated` model and `pay_in_advance` are not allowed.
             * @default false
             * @example false
             */
            prorated?: boolean;
            /** List of all thresholds utilized for calculating the fixed charge. */
            properties?: FixedChargeProperties;
            /** List of taxes applied to the fixed charge. */
            tax_codes?: TaxCodes;
            /**
             * Determines if the units should be applied immediately upon assignment or deferred to the next billing cycle.
             * @example true
             */
            apply_units_immediately?: boolean;
        }[];
        /** List of usage thresholds to apply to the plan. */
        usage_thresholds?: UsageThresholdInput[];
        /**
         * This field determines whether the changes made to the plan should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.
         * @example true
         */
        cascade_updates?: boolean;
        /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
        metadata?: MetadataInput;
    };
}
export interface PlanEntitlements {
    entitlements: PlanEntitlementObject[];
}
export interface EntitlementUpdateInput {
    /**
     * Feature entitlements with their privilege values. Each key is a feature code, and the value is an object containing privilege codes with their associated values.
     * @example {"seats":{"max":20,"max_admins":10,"root":false},"sso":{"provider":"okta"}}
     */
    entitlements: Record<string, Record<string, number | boolean | string>>;
}
export interface PlanMetadataResponse {
    /**
     * Custom metadata stored as key-value pairs.
     * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
     */
    metadata: MetadataObject;
}
export interface ChargesPaginated {
    charges: ChargeObject[];
    meta: PaginationMeta;
}
/** Properties of a charge that can be overridden at the subscription level. */
export interface ChargeOverridableInput {
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
     * @example "Setup"
     */
    invoice_display_name?: string;
    /**
     * The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.
     * @example 0
     */
    min_amount_cents?: number;
    /** List of all thresholds utilized for calculating the charge. */
    properties?: ChargeProperties;
    /** List of filters used to apply differentiated pricing based on additional event properties. */
    filters?: ChargeFilterInput[];
    /** List of unique code used to identify the taxes. */
    tax_codes?: TaxCodes;
    /** The pricing unit to apply to the charge. */
    applied_pricing_unit?: {
        /**
         * The code of the pricing unit.
         * @example "credits"
         */
        code?: string;
        /**
         * The conversion rate from pricing units to the plan's currency.
         * This rate determines how many currency units (in the plan's base currency) equal one pricing unit.
         * For example, if the plan uses USD and the conversion rate is 0.5, then 1 pricing unit = $0.50.
         * @example "0.5"
         */
        conversion_rate?: string;
    };
}
export type ChargeInput = ChargeOverridableInput & {
    /**
     * Unique identifier of the billable metric created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    billable_metric_id?: string;
    /**
     * Unique code identifying the charge within the plan.
     * @example "api_requests_charge"
     */
    code?: string;
    /**
     * Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:
     *   - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)
     *   - [`graduated_percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated-percentage)
     *   - [`graduated`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated)
     *   - [`package`](https://docs.getlago.com/guide/plans/charges/charge-models/package)
     *   - [`percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/percentage)
     *   - [`standard`](https://docs.getlago.com/guide/plans/charges/charge-models/standard)
     *   - [`volume`](https://docs.getlago.com/guide/plans/charges/charge-models/volume)
     */
    charge_model?: ChargeModelEnum;
    /**
     * This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period.
     * @example false
     */
    pay_in_advance?: boolean;
    /**
     * This field specifies whether the charge should be included in a proper invoice. If set to false, no invoice will be issued for this charge. You can only set it to `false` when `pay_in_advance` is `true`.
     * @example true
     */
    invoiceable?: boolean;
    /**
     * This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
     * This field determines whether and when the charge fee should be included in
     * the invoice. If `null`, no invoice will be issued for this charge fee.
     * If `invoice`, an invoice will be generated at the end of the period,
     * consolidating all charge fees with a succeeded payment status.
     * @example null
     */
    regroup_paid_fees?: "invoice";
    /**
     * Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
     *
     * - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
     * - If set to `false`, the charge is billed in full.
     * - If not defined in the request, default value is `false`.
     * @example false
     */
    prorated?: boolean;
};
export interface ChargeCreateInput {
    charge: ChargeInput & {
        /**
         * This field determines whether the creation of the charge should be cascaded to the children plans. When set to `true`, the charge will be created in children plans. Conversely, when set to `false`, the charge will only be created in the plan itself. If not defined in the request, default value is `false`.
         * @example true
         */
        cascade_updates?: boolean;
    };
}
export interface Charge {
    charge: ChargeObject;
}
export interface ChargeUpdateInput {
    charge: ChargeInput & {
        /**
         * This field determines whether the changes made to the charge should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.
         * @example true
         */
        cascade_updates?: boolean;
    };
}
export interface ChargeDeleteInput {
    charge?: {
        /**
         * When set to `true`, the deletion will be cascaded to the children plans.
         * @example true
         */
        cascade_updates?: boolean;
    };
}
/** Charge filter values used to apply differentiated pricing based on additional event properties. */
export interface ChargeFilterFullObject {
    /**
     * Unique identifier of the charge filter, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Unique code identifying the charge this filter belongs to.
     * @example "api_requests_charge"
     */
    charge_code: string;
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.
     * @example "AWS"
     */
    invoice_display_name: string | null;
    /** List of all thresholds utilized for calculating the charge. */
    properties: ChargeProperties;
    /**
     * List of possible filter values. The key and values must match one of the billable metric filters.
     * @example {"region":["us-east-1"]}
     */
    values: Record<string, string[]>;
}
export interface ChargeFiltersPaginated {
    filters: ChargeFilterFullObject[];
    meta: PaginationMeta;
}
export interface ChargeFilterCreateInput {
    filter: {
        /**
         * This field determines whether the creation of the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.
         * @example true
         */
        cascade_updates?: boolean;
        /**
         * Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.
         * @example "AWS"
         */
        invoice_display_name?: string | null;
        /** List of all thresholds utilized for calculating the charge. */
        properties: ChargeProperties;
        /**
         * List of possible filter values. The key and values must match one of the billable metric filters.
         * @example {"region":["us-east-1"]}
         */
        values: Record<string, string[]>;
    };
}
export interface ChargeFilterResponse {
    /** Charge filter values used to apply differentiated pricing based on additional event properties. */
    filter: ChargeFilterFullObject;
}
export interface ChargeFilterUpdateInput {
    filter: {
        /**
         * This field determines whether the changes made to the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.
         * @example true
         */
        cascade_updates?: boolean;
        /**
         * Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.
         * @example "AWS"
         */
        invoice_display_name?: string | null;
        /** List of all thresholds utilized for calculating the charge. */
        properties?: ChargeProperties;
        /**
         * List of possible filter values. The key and values must match one of the billable metric filters.
         * @example {"region":["us-east-1"]}
         */
        values?: Record<string, string[]>;
    };
}
export interface ChargeFilterDeleteInput {
    filter?: {
        /**
         * When set to `true`, the deletion will be cascaded to the children plans.
         * @example true
         */
        cascade_updates?: boolean;
    };
}
export interface FixedChargesPaginated {
    fixed_charges: FixedChargeObject[];
    meta: PaginationMeta;
}
/** Properties of a fixed charge that can be overridden at the subscription level. */
export interface FixedChargeOverridableInput {
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the add-on will be used as the default display name.
     * @example "Setup Fee"
     */
    invoice_display_name?: string | null;
    /**
     * The quantity of units for the fixed charge.
     * @example "1.0"
     */
    units?: string;
    /**
     * When set to `true`, the fixed charge units are applied immediately for active subscriptions. When set to `false`, the units are applied at the next billing period.
     * @example false
     */
    apply_units_immediately?: boolean;
    /** List of all thresholds utilized for calculating the fixed charge. */
    properties?: ChargeProperties;
    /** List of unique code used to identify the taxes. */
    tax_codes?: TaxCodes;
}
/**
 * Specifies the pricing model used for the calculation of the fixed charge fee. It can be any of the following values:
 *   - `standard`
 *   - `graduated`
 *   - `volume`
 */
export type FixedChargeModelEnum = "standard" | "graduated" | "volume";
export type FixedChargeInput = FixedChargeOverridableInput & {
    /**
     * Unique identifier of the add-on. Either add_on_id or add_on_code is required.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    add_on_id?: string;
    /**
     * Unique code identifying an add-on. Either add_on_id or add_on_code is required.
     * @example "setup_fee"
     */
    add_on_code?: string;
    /**
     * Unique code identifying the fixed charge within the plan.
     * @example "setup_fee_charge"
     */
    code?: string;
    /**
     * Specifies the pricing model used for the calculation of the fixed charge fee. It can be any of the following values:
     *   - `standard`
     *   - `graduated`
     *   - `volume`
     */
    charge_model?: FixedChargeModelEnum;
    /**
     * This field determines the billing timing for this fixed charge. When set to `true`, the charge is due and invoiced immediately at the beginning of the billing period. When set to `false`, the charge is due and invoiced at the end of the billing period.
     * @example true
     */
    pay_in_advance?: boolean;
    /**
     * Specifies whether a fixed charge is prorated based on the remaining number of days in the billing period or billed fully.
     *
     * - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
     * - If set to `false`, the charge is billed in full.
     * @example false
     */
    prorated?: boolean;
};
export interface FixedChargeCreateInput {
    fixed_charge: FixedChargeInput & {
        /**
         * This field determines whether the creation of the fixed charge should be cascaded to the children plans. When set to `true`, the fixed charge will be created in children plans. Conversely, when set to `false`, the fixed charge will only be created in the plan itself. If not defined in the request, default value is `false`.
         * @example true
         */
        cascade_updates?: boolean;
    };
}
export interface FixedCharge {
    fixed_charge: FixedChargeObject;
}
export interface FixedChargeUpdateInput {
    fixed_charge: FixedChargeInput & {
        /**
         * This field determines whether the changes made to the fixed charge should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.
         * @example true
         */
        cascade_updates?: boolean;
    };
}
export interface FixedChargeDeleteInput {
    fixed_charge?: {
        /**
         * When set to `true`, the deletion will be cascaded to the children plans.
         * @example true
         */
        cascade_updates?: boolean;
    };
}
/** Based plan overrides. */
export interface PlanOverridesObject {
    /**
     * The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.
     * @example 10000
     */
    amount_cents?: number;
    /**
     * The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.
     * @example "USD"
     */
    amount_currency?: Currency;
    /**
     * The description on the plan.
     * @example "Plan for early stage startups."
     */
    description?: string;
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.
     * @example "Startup plan"
     */
    invoice_display_name?: string;
    /**
     * The name of the plan.
     * @example "Startup"
     */
    name?: string;
    /** List of unique code used to identify the taxes. */
    tax_codes?: TaxCodes;
    /**
     * The duration in days during which the base cost of the plan is offered for free.
     * @example 5
     */
    trial_period?: number;
    /** Minimum commitment for this plan. */
    minimum_commitment?: MinimumCommitmentInput;
    /** Additional usage-based charges for this plan. */
    charges?: {
        /**
         * Unique identifier of the charge created by Lago.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        id?: string;
        /**
         * Unique identifier of the billable metric created by Lago.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        billable_metric_id?: string;
        /**
         * Unique code identifying the charge within the plan.
         * @example "api_requests_charge"
         */
        code?: string;
        /**
         * Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:
         *   - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)
         *   - [`graduated_percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated-percentage)
         *   - [`graduated`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated)
         *   - [`package`](https://docs.getlago.com/guide/plans/charges/charge-models/package)
         *   - [`percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/percentage)
         *   - [`standard`](https://docs.getlago.com/guide/plans/charges/charge-models/standard)
         *   - [`volume`](https://docs.getlago.com/guide/plans/charges/charge-models/volume)
         */
        charge_model?: ChargeModelEnum;
        /**
         * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
         * @example "Setup"
         */
        invoice_display_name?: string;
        /**
         * The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.
         * @example 0
         */
        min_amount_cents?: number;
        /** List of all thresholds utilized for calculating the charge. */
        properties?: ChargeProperties;
        /** List of filters used to apply differentiated pricing based on additional event properties. */
        filters?: ChargeFilterInput[];
        /** List of unique code used to identify the taxes. */
        tax_codes?: TaxCodes;
        /** Updates the pricing unit conversion rate for this charge. Only applies if the charge has applied pricing unit. */
        applied_pricing_unit?: {
            /**
             * The conversion rate from pricing units to the plan's currency.
             * This rate determines how many currency units (in the plan's base currency) equal one pricing unit.
             * For example, if the plan uses USD and the conversion rate is 0.5, then 1 pricing unit = $0.50 USD.
             * @example "0.5"
             */
            conversion_rate?: string;
        };
    }[];
    /** Additional fixed charges for this plan. */
    fixed_charges?: {
        /**
         * Unique identifier of the fixed charge created by Lago.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        id: string;
        /**
         * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
         * @example "Setup fee"
         */
        invoice_display_name?: string;
        /**
         * The number of units for the fixed charge. Defaults to 0 if not provided.
         * @default 0
         * @example 1
         */
        units?: number;
        /**
         * Determines if the units should be applied immediately upon assignment or deferred to the next billing cycle.
         * @example true
         */
        apply_units_immediately?: boolean;
        /** List of all thresholds utilized for calculating the fixed charge. */
        properties?: FixedChargeProperties;
        /** List of taxes applied to the fixed charge. */
        tax_codes?: TaxCodes;
    }[];
    /** List of usage thresholds applied to the subscription. */
    usage_thresholds?: UsageThresholdInput[];
    /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
    metadata?: MetadataInput;
}
export interface SubscriptionCreateInput {
    /**
     * Optionally, you can create a pre-authorization on the customer's card before creating a subscription. This process places a temporary hold (capture) for a specified amount on the customer's account, but does not actually withdraw the funds.
     *
     * Important notes:
     *   - The final amount due for the subscription is not known at the time of creation; it is determined only after the invoice is finalized.
     *   - The payment intent generated for pre-authorization cannot be reused, as the final invoice amount may exceed the authorized amount.
     *   - The payment intent is canceled immediately after creation, but this cancellation occurs asynchronously.
     *   - For these reasons, it is recommended to use a small amount (such as $1) for pre-authorization. While this does not guarantee sufficient funds for the final payment, it helps reduce the likelihood of payment errors.
     */
    authorization?: {
        /**
         * The amount of the authorization in cents.
         * @example 1000
         */
        amount_cents: number;
        /**
         * The currency of the authorization.
         * @example "USD"
         */
        amount_currency: string;
    };
    subscription: {
        /**
         * The code of the billing entity to be used for the subscription. If not provided, the default billing entity will be used.
         * @example "default"
         */
        billing_entity_code?: string;
        /**
         * The customer external unique identifier (provided by your own application)
         * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
         */
        external_customer_id: string;
        /**
         * The unique code representing the plan to be attached to the customer. This code must correspond to the `code` property of one of the active plans.
         * @example "premium"
         */
        plan_code: string;
        /**
         * The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan.
         * @example "Repository A"
         */
        name?: string;
        /**
         * The unique external identifier for the subscription. This identifier serves as an idempotency key, ensuring that each subscription is unique.
         * @example "my_sub_1234567890"
         */
        external_id: string;
        /**
         * The billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration).
         * @example "anniversary"
         */
        billing_time?: "calendar" | "anniversary";
        /**
         * The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).
         * @format date-time
         * @example "2022-10-08T00:00:00Z"
         */
        ending_at?: string;
        /**
         * The start date for the subscription, allowing for the creation of subscriptions that can begin in the past or future. Please note that it cannot be used to update the start date of a pending subscription or schedule an upgrade/downgrade. The start_date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
         * @format date-time
         * @example "2022-08-08T00:00:00Z"
         */
        subscription_at?: string;
        /** Based plan overrides. */
        plan_overrides?: PlanOverridesObject;
        /** Configuration for invoice custom sections to apply to invoices generated by this resource. */
        invoice_custom_section?: InvoiceCustomSectionInput;
        /** Optional payment method to use for processing subscription payments. */
        payment_method?: PaymentMethodReference;
    };
}
export interface ApplicableUsageThreshold {
    /**
     * The display name of the usage threshold.
     * @example "Threshold 1"
     */
    threshold_display_name: string | null;
    /**
     * The amount to reach to trigger a `progressive_billing` invoice.
     * @example 10000
     */
    amount_cents: number;
    /**
     * This field when set to `true` indicates that a `progressive_billing` invoice will be created every time the lifetime usage increases by the specified amount.
     * @example true
     */
    recurring: boolean;
}
export type SubscriptionObjectExtended = SubscriptionObject & {
    plan?: PlanObject;
    /** List of usage thresholds applicable to this subscription. */
    applicable_usage_thresholds?: ApplicableUsageThreshold[];
};
export interface SubscriptionExtended {
    subscription: SubscriptionObjectExtended;
}
export interface SubscriptionUpdateInput {
    /**
     * If the field is not defined and multiple `active` and `pending` subscriptions exists, Lago will update the `active` subscription. However, if you wish to update a `pending` subscription, please ensure that you include the `status` attribute with the `pending` value in your request body.
     * @example "active"
     */
    status?: "active" | "pending";
    subscription: {
        /**
         * The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan.
         * @example "Repository B"
         */
        name?: string | null;
        /**
         * The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).
         * @format date-time
         * @example "2022-10-08T00:00:00Z"
         */
        ending_at: string | null;
        /**
         * The start date and time of the subscription. This field can only be modified for pending subscriptions that have not yet started. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
         * @format date-time
         * @example "2022-08-08T00:00:00Z"
         */
        subscription_at?: string;
        /** Based plan overrides. */
        plan_overrides?: PlanOverridesObject;
        /** Configuration for invoice custom sections to apply to invoices generated by this resource. */
        invoice_custom_section?: InvoiceCustomSectionInput;
        /** Optional payment method to use for processing subscription payments. */
        payment_method?: PaymentMethodReference;
    };
}
export interface Subscription {
    subscription: SubscriptionObject;
}
export interface LifetimeUsageThresholdObject {
    /**
     * The usage threshold amount in cents.
     * @example 100
     */
    amount_cents: number;
    /**
     * The completion ratio of the usage threshold.
     * @example 0.5
     */
    completion_ratio: number;
    /**
     * The date and time when the usage threshold was reached. The date and time must be in ISO 8601 format.
     * @format date-time
     * @example "2024-01-01T00:00:00Z"
     */
    reached_at: string | null;
}
export interface LifetimeUsageObject {
    /**
     * Unique identifier assigned to the lifetime usage record within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the lifetime usage record within the Lago system
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Unique identifier assigned to the subscription record within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription record within the Lago system
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_subscription_id: string;
    /**
     * The subscription external unique identifier (provided by your own application).
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_subscription_id: string;
    /**
     * The historical usage amount in cents for the subscription (provided by your own application).
     * @example 100
     */
    external_historical_usage_amount_cents: number;
    /**
     * The total invoiced usage amount in cents for the subscription.
     * @example 100
     */
    invoiced_usage_amount_cents: number;
    /**
     * The current usage amount in cents for the subscription on the current billing period.
     * @example 100
     */
    current_usage_amount_cents: number;
    /**
     * The recording start date and time of the subscription lifetime usage. The date and time must be in ISO 8601 format.
     * @format date-time
     * @example "2024-01-01T00:00:00Z"
     */
    from_datetime: string | null;
    /**
     * The recording end date and time of the subscription lifetime usage. The date and time must be in ISO 8601 format.
     * @format date-time
     * @example "2024-12-31T23:59:59Z"
     */
    to_datetime: string;
    /** Array of usage thresholds attached to the subscription's plan. */
    usage_thresholds?: LifetimeUsageThresholdObject[];
}
export interface LifetimeUsage {
    lifetime_usage: LifetimeUsageObject;
}
export interface LifetimeUsageInput {
    lifetime_usage: {
        /**
         * The historical usage amount in cents for the subscription (provided by your own application).
         * @example 100
         */
        external_historical_usage_amount_cents: number;
    };
}
export interface AlertObject {
    /**
     * Unique identifier of the alert, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Unique identifier of the organization, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_organization_id: string;
    /**
     * The subscription external unique identifier (provided by your own application).
     * @example "sub_1234567890"
     */
    external_subscription_id: string | null;
    lago_wallet_id?: null;
    wallet_code?: null;
    /** The billable metric associated with the alert. Only for alerts based on a billable metric. */
    billable_metric: BillableMetricObject;
    /**
     * The type of alert.
     * @example "billable_metric_current_usage_amount"
     */
    alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
    /**
     * Unique code used to identify the alert.
     * @example "storage_threshold_alert"
     */
    code: string;
    /**
     * The name of the alert.
     * @example "Storage Usage Alert"
     */
    name: string | null;
    /**
     * Indicates whether the alert is triggered when the monitored metric goes above or below the threshold.
     * @example "increasing"
     */
    direction?: "increasing" | "decreasing";
    /**
     * When the system checked if this alert should be triggered, this value was retrieved and checked against the thresholds.
     * @example 1000
     */
    previous_value: number;
    /**
     * The date and time in UTC (ISO 8601) when the system checked if this alert should be triggered. Null until it's processed for the first time.
     * @format date-time
     * @example "2025-05-19T10:04:21Z"
     */
    last_processed_at: string | null;
    /** Array of thresholds associated with the alert. */
    thresholds: AlertThresholdObject[];
    /**
     * The date and time in UTC (ISO 8601) when the alert was created.
     * @format date-time
     * @example "2025-03-20T10:00:00Z"
     */
    created_at: string;
}
export interface Alerts {
    alerts: AlertObject[];
    meta?: PaginationMeta;
}
export interface AlertCreateInput {
    alert: AlertBaseInput & {
        /**
         * The type of alert.
         * @example "billable_metric_current_usage_amount"
         */
        alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
        /**
         * Unique code used to identify the alert.
         * @example "storage_threshold_alert"
         */
        code: string;
        /**
         * The code of the billable metric associated with the alert. Only for alerts based on a billable metric.
         * @example "storage_usage"
         */
        billable_metric_code?: string | null;
    };
}
export interface AlertBatchCreateInput {
    /** Array of alerts to create. All alerts are created atomically - if any fail validation, none are created. */
    alerts: (AlertBaseInput & {
        /**
         * The type of alert.
         * @example "billable_metric_current_usage_amount"
         */
        alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
        /**
         * Unique code used to identify the alert.
         * @example "storage_threshold_alert"
         */
        code: string;
        /**
         * The code of the billable metric associated with the alert. Only for alerts based on a billable metric.
         * @example "storage_usage"
         */
        billable_metric_code?: string | null;
    })[];
}
export interface Alert {
    alert: AlertObject;
}
export interface AlertUpdateInput {
    alert: AlertBaseInput & {
        /**
         * The code of the billable metric associated with the alert. Only for alerts based on a billable metric.
         * @example "storage_usage"
         */
        billable_metric_code?: string | null;
    };
}
export type SubscriptionEntitlementPrivilegeObject = FeaturePrivilegeObject & {
    /**
     * Applicable value this this subscription (override_value if set, plan_value otherwise). Type depends on the privilege's value_type.
     * @example 10
     */
    value: number | boolean | string;
    /**
     * Value assigned to this privilege in the plan. Type depends on the privilege's value_type.
     * @example 10
     */
    plan_value: number | boolean | string;
    /**
     * Value assigned to this subscription specifically. Type depends on the privilege's value_type. Null if no override is set.
     * @example 10
     */
    override_value: number | boolean | string | null;
};
export interface SubscriptionEntitlementObject {
    /**
     * Unique code used to identify the feature. Max 255 characters.
     * @example "seats"
     */
    code: string;
    /**
     * Name of the feature. Max 255 characters.
     * @example "Number of seats"
     */
    name: string | null;
    /**
     * Description of the feature. Max 600 characters.
     * @example "Number of users of the account"
     */
    description: string | null;
    /**
     * Privileges associated with this feature. Each privilege shows the plan value and any subscription override.
     * @example [{"code":"max","name":"Maximum","value_type":"integer","config":{},"value":15,"plan_value":10,"override_value":15},{"code":"max_admins","name":"Max Admins","value_type":"integer","config":{},"value":5,"plan_value":5,"override_value":null},{"code":"root","name":"Allow root user","value_type":"boolean","config":{},"value":true,"plan_value":true,"override_value":null},{"code":"provider","name":"SSO Provider","value_type":"select","value":"okta","plan_value":"google","override_value":"okta","config":{"select_options":["google","okta"]}}]
     */
    privileges: SubscriptionEntitlementPrivilegeObject[];
    /** @example {"max":15,"provider":"okta"} */
    overrides: Record<string, any>;
}
export interface SubscriptionEntitlements {
    entitlements: SubscriptionEntitlementObject[];
}
export interface SubscriptionEntitlement {
    entitlement: SubscriptionEntitlementObject;
}
export interface SubscriptionChargeOverride {
    /** Properties of a charge that can be overridden at the subscription level. */
    charge: ChargeOverridableInput;
}
export interface SubscriptionFixedChargeOverride {
    /** Properties of a fixed charge that can be overridden at the subscription level. */
    fixed_charge: FixedChargeOverridableInput;
}
export interface TaxesPaginated {
    taxes: TaxObject[];
    meta: PaginationMeta;
}
export interface TaxBaseInput {
    /**
     * Name of the tax.
     * @example "TVA"
     */
    name?: string;
    /**
     * Unique code used to identify the tax associated with the API request.
     * @example "french_standard_vat"
     */
    code?: string;
    /**
     * The percentage rate of the tax
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "20.0"
     */
    rate?: string;
    /**
     * Internal description of the taxe
     * @example "French standard VAT"
     */
    description?: string | null;
    /**
     * This field is deprecated and will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.
     * @deprecated
     * @example true
     */
    applied_to_organization?: boolean;
}
export interface TaxCreateInput {
    tax: TaxBaseInput;
}
export interface Tax {
    tax: TaxObject;
}
export interface TaxUpdateInput {
    tax: TaxBaseInput;
}
export interface WalletTransactionCreateInput {
    wallet_transaction: {
        /**
         * Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        wallet_id: string;
        /**
         * The name of the wallet transaction. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.
         *
         * Note that this name will apply to all transactions (`paid_credits`, `granted_credits` and `voided_credits`) created by this action.
         * @example "Tokens for models 'high-fidelity-boost'"
         */
        name?: string | null;
        /**
         * The number of paid credits.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "20.0"
         */
        paid_credits?: string | null;
        /**
         * The number of free granted credits.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "10.0"
         */
        granted_credits?: string | null;
        /**
         * The number of voided credits.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "5.0"
         */
        voided_credits?: string | null;
        /**
         * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
         * @example false
         */
        invoice_requires_successful_payment?: boolean;
        /**
         * When true, allows topping up the wallet with transactions that exceed the paid top-up limits. Defaults to false.
         * @example false
         */
        ignore_paid_top_up_limits?: boolean;
        /** Configuration for invoice custom sections to apply to invoices generated by this resource. */
        invoice_custom_section?: InvoiceCustomSectionInput;
        /** Optional payment method to use for processing the wallet transaction payment. */
        payment_method?: PaymentMethodReference;
        /**
         * This optional field allows you to store a list of key-value pairs that hold additional information or custom attributes related to the data.
         * @example [{"key":"example key","value":"example value"},{"key":"another key","value":"another value"}]
         */
        metadata?: any[] | null;
    };
}
export interface WalletTransactionObject {
    /**
     * Unique identifier assigned to the wallet transaction within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet transaction's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_wallet_id: string;
    /**
     * Unique identifier assigned to the invoice associated with this wallet transaction. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_invoice_id: string | null;
    /**
     * Unique identifier of the credit note associated with this wallet transaction. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_credit_note_id: string | null;
    /**
     * Unique identifier of the invoice that was voided and triggered the creation of this inbound wallet transaction. Only present for inbound transactions on traceable wallets that were created as a result of an invoice void.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_voided_invoice_id: string | null;
    /**
     * The status of the wallet transaction. Possible values are `pending`, `settled` or `failed`.
     * @example "settled"
     */
    status: "pending" | "settled" | "failed";
    /**
     * The source field represents the origin or trigger of the wallet transaction. Possible values are `manual`, `interval`, `threshold`
     * @example "manual"
     */
    source: "manual" | "interval" | "threshold";
    /**
     * The transaction status of the wallet transaction. Possible values are `purchased` (with pending or settled status), `granted` (without invoice_id), `voided` or `invoiced`.
     * @example "purchased"
     */
    transaction_status: "purchased" | "granted" | "voided" | "invoiced";
    /**
     * The type of transaction. Possible values are `inbound` (increasing the balance) or `outbound` (decreasing the balance).
     * @example "inbound"
     */
    transaction_type: "inbound" | "outbound";
    /**
     * The amount of credits based on the rate and the currency.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "10.0"
     */
    amount: string;
    /**
     * The number of credits used in the wallet transaction.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "100.0"
     */
    credit_amount: string;
    /**
     * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
     * @example false
     */
    invoice_requires_successful_payment: boolean;
    /**
     * This field allows you to store a list of key-value pairs that hold additional information or custom attributes related to the data.
     * @example [{"key":"example key","value":"example value"},{"key":"another key","value":"another value"}]
     */
    metadata: {
        /** The unique identifier for the attribute. */
        key?: string;
        /** The value associated with the key. */
        value?: string;
    }[];
    /**
     * The remaining unconsumed amount of an inbound wallet transaction, expressed in cents. Only present for inbound transactions on traceable wallets. Tracks how much of the original credited amount has not yet been consumed by outbound transactions.
     * @example 5000
     */
    remaining_amount_cents: number | null;
    /**
     * The remaining unconsumed amount of an inbound wallet transaction, expressed in credits. Only present for inbound transactions on traceable wallets.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "5.0"
     */
    remaining_credit_amount: string | null;
    /**
     * The priority of the wallet transaction, used to determine the order in which inbound transactions are consumed. Lower values are consumed first.
     * @example 50
     */
    priority: number;
    /**
     * The date when wallet transaction is settled, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    settled_at: string | null;
    /**
     * The date when the wallet transaction failed, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    failed_at: string | null;
    /**
     * The date of the wallet transaction creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /**
     * The name of the wallet transaction. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.
     * @example "Tokens for models 'high-fidelity-boost'"
     */
    name: string | null;
    /** The invoice custom sections applied to invoices generated by this wallet transaction. */
    applied_invoice_custom_sections?: AppliedInvoiceCustomSectionObject[];
    /** The payment method assigned to this wallet transaction for processing the payment. */
    payment_method: PaymentMethodReference;
}
export interface WalletTransactions {
    wallet_transactions: WalletTransactionObject[];
}
/** . */
export interface WalletTransactionPaymentUrl {
    wallet_transaction_payment_details?: {
        /**
         * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_customer_id?: string;
        /**
         * Unique identifier assigned to the wallet transaction within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet transaction's record within the Lago system
         * @example "1e501a90-1a90-1a90-1a90-1a901a901a80"
         */
        lago_wallet_transaction_id?: string;
        /**
         * The customer external unique identifier (provided by your own application)
         * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
         */
        external_customer_id?: string;
        /**
         * The Payment Provider name linked to the Customer.
         * @example "stripe"
         */
        payment_provider?: string;
        /**
         * The generated Payment URL for the Wallet transaction.
         * @example "https://foo.bar"
         */
        payment_url?: string;
    };
}
export interface WalletTransactionConsumptionObject {
    /**
     * Unique identifier assigned to the wallet transaction consumption within the Lago application.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The amount consumed from the inbound wallet transaction, expressed in cents.
     * @example 5000
     */
    amount_cents: number;
    /**
     * The amount consumed from the inbound wallet transaction, expressed in credits.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "5.0"
     */
    credit_amount: string;
    /**
     * The date of the consumption record creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    wallet_transaction: WalletTransactionObject;
}
export interface WalletTransactionConsumptions {
    wallet_transaction_consumptions: WalletTransactionConsumptionObject[];
}
export type WalletTransactionConsumptionsPaginated = WalletTransactionConsumptions & {
    meta: PaginationMeta;
};
export interface WalletTransactionFundingObject {
    /**
     * Unique identifier assigned to the wallet transaction funding within the Lago application.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The amount funded from the inbound wallet transaction, expressed in cents.
     * @example 5000
     */
    amount_cents: number;
    /**
     * The amount funded from the inbound wallet transaction, expressed in credits.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "5.0"
     */
    credit_amount: string;
    /**
     * The date of the funding record creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    wallet_transaction: WalletTransactionObject;
}
export interface WalletTransactionFundings {
    wallet_transaction_fundings: WalletTransactionFundingObject[];
}
export type WalletTransactionFundingsPaginated = WalletTransactionFundings & {
    meta: PaginationMeta;
};
export type WalletTransactionsPaginated = WalletTransactions & {
    meta: PaginationMeta;
};
export interface WebhookEndpointObject {
    /**
     * Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the webhook endpoint's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Unique identifier assigned to the organization attached to the webhook endpoint within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the organization's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_organization_id: string;
    /**
     * The name of the wallet.
     * @example "Prepaid"
     */
    webhook_url: string;
    /**
     * The signature algo for the webhook.
     * @example "hmac"
     */
    signature_algo?: "jwt" | "hmac";
    /**
     * The date of the webhook endpoint creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
}
export interface WebhookEndpointsPaginated {
    webhook_endpoints: WebhookEndpointObject[];
    meta: PaginationMeta;
}
export interface WebhookEndpointCreateInput {
    webhook_endpoint?: {
        /**
         * The URL of the webhook endpoint.
         * @example "https://foo.bar"
         */
        webhook_url: string;
        /**
         * The signature used for the webhook. If no value is passed,
         * @example "hmac"
         */
        signature_algo?: "jwt" | "hmac";
    };
}
export interface WebhookEndpoint {
    webhook_endpoint: WebhookEndpointObject;
}
export interface WebhookEndpointUpdateInput {
    webhook_endpoint?: {
        /**
         * The URL of the webhook endpoint.
         * @example "https://foo.bar"
         */
        webhook_url: string;
        /**
         * The signature used for the webhook. If no value is passed,
         * @example "hmac"
         */
        signature_algo?: "jwt" | "hmac";
    };
}
export interface TriggeredAlertObject {
    /**
     * Unique identifier of the alert, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Unique identifier of the organization, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_organization_id: string;
    /**
     * Unique identifier of the alert, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_alert_id: string;
    /**
     * Unique identifier of the subscription, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_subscription_id: string;
    /**
     * The subscription external unique identifier (provided by your own application).
     * @example "sub_1234567890"
     */
    external_subscription_id: string;
    /**
     * The customer external unique identifier (provided by your own application).
     * @example "cust_1234567890"
     */
    external_customer_id: string;
    /**
     * The code of the billable metric associated with the alert. Only for alerts based on a billable metric.
     * @example "storage_usage"
     */
    billable_metric_code: string | null;
    /**
     * The type of alert triggered.
     * @example "billable_metric_current_usage_amount"
     */
    alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
    /**
     * Unique code used to identify the alert triggered.
     * @example "storage_threshold_alert"
     */
    alert_code: string;
    /**
     * The name of the alert triggered.
     * @example "Storage Usage Alert"
     */
    alert_name: string | null;
    /**
     * When the system checked if this alert should be triggered, this value was retrieved and checked if any threshold were crossed between this value and previous value.
     * @example 1200
     */
    current_value: number;
    /**
     * During the previous run, this value was retrieved.
     * @example 900
     */
    previous_value: number;
    /**
     * The date and time in UTC (ISO 8601) when the system triggered the alert.
     * @format date-time
     * @example "2025-05-19T10:04:21Z"
     */
    triggered_at: string | null;
    /** Array of thresholds crossed. All the recurring threshold values are present. */
    crossed_thresholds: AlertThresholdObject[];
}
export interface CustomerIntegratrionErrorObject {
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /**
     * The type of accounting provider code
     * @example "anrok"
     */
    accounting_provider: "anrok" | "hubspot" | "netsuite" | "okta" | "salesforce" | "xero";
    /**
     * Code of the accounting provider
     * @example "Netsuite Prod"
     */
    accounting_provider_code: string;
    provider_error: string | Record<string, any>;
}
export interface CustomerPaymentProviderErrorObject {
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /**
     * The type of payment provider
     * @example "stripe"
     */
    payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
    /**
     * Code of the payment provider
     * @example "Stripe Prod"
     */
    payment_provider_code: string;
    provider_error: string | Record<string, any>;
}
export interface CustomerTaxProviderErrorObject {
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /**
     * The type of tax provider
     * @example "anrock"
     */
    tax_provider: "anrock" | "hubspot" | "netsuite" | "okta" | "salesforce" | "xero";
    /**
     * Code of the tax provider
     * @example "Stripe Prod"
     */
    tax_provider_code: string;
    provider_error: string | Record<string, any>;
}
export type CustomerViesCheckObject = CustomerBaseObject & {
    vies_check?: {
        /**
         * Whether the VIES check was successful
         * @example true
         */
        valid?: boolean;
    };
};
export interface CreditNotePaymentProviderRefundError {
    /**
     * Unique identifier assigned to the credit note within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the credit note record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_credit_note_id: string;
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /**
     * Unique identifier of the customer within the payment provider
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    provider_customer_id?: string;
    /**
     * The type of payment provider code
     * @example "stripe"
     */
    payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
    /**
     * Code of the payment provider
     * @example "Stripe Prod"
     */
    payment_provider_code?: string;
    provider_error?: string | Record<string, any>;
}
export interface DunningCampaignFinishedObject {
    /**
     * The customer external unique identifier (provided by your own application).
     * @example "cus_0987654321"
     */
    external_customer_id: string;
    /**
     * Identifier of the dunning campaign.
     * @example "dun_code_1234"
     */
    dunning_campaign_code: string;
    /**
     * The amount of the overdue balance, expressed in cents.
     * @example 120
     */
    overdue_balance_cents: number;
    /**
     * The currency of the balance.
     * @example "EUR"
     */
    overdue_balance_currency: Currency;
}
export interface EventErrorsObject {
    /**
     * HTTP status code. It will always be 422
     * @example 422
     */
    status: number;
    /**
     * HTTP error description. It will always be "Unprocessable entity"
     * @example "Unprocessable entity"
     */
    error: string;
    message: string | Record<string, any>;
    event: EventObject;
}
export interface EventsErrorsObject {
    /**
     * List of event transaction_id with an invalid code
     * @example ["transaction_1234567890"]
     */
    invalid_code: string[];
    /**
     * List of event transaction_id with a missing aggregation property
     * @example ["transaction_1234567890"]
     */
    missing_aggregation_property: string[];
    /**
     * List of event transaction_id with invalid filter values
     * @example ["transaction_1234567890"]
     */
    invalid_filter_values: string[];
    /** @deprecated */
    missing_group_key: string[];
}
export interface FeeTaxProviderErrorObject {
    /**
     * Code of the tax provider
     * @example "Stripe Prod"
     */
    tax_provider_code: string;
    /**
     * Unique identifier assigned to the charge that the fee belongs to
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_charge_id: string | null;
    /**
     * Unique identifier assigned to the transaction. This field is specifically displayed when the fee type is `charge`.
     * @example "transaction_1234567890"
     */
    event_transaction_id: string | null;
    provider_error: string | Record<string, any>;
}
export type InvoicePaymentDisputeLostObject = InvoiceObjectExtended & {
    provider_error?: string | Record<string, any>;
};
export interface InvoicePaymentFailureObject {
    /**
     * Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_invoice_id: string;
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /**
     * Unique identifier of the customer within the payment provider
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    provider_customer_id?: string;
    /**
     * The type of payment provider code
     * @example "stripe"
     */
    payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
    /**
     * Code of the payment provider
     * @example "Stripe Prod"
     */
    payment_provider_code?: string;
    provider_error?: string | Record<string, any>;
}
export interface IntegrationProviderErrorObject {
    /**
     * Unique identifier assigned to the integration within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the integration's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_integration_id: string;
    /**
     * The type of integration provider
     * @example "netsuite"
     */
    provider: string;
    /**
     * Unique code used to identify an integration connection.
     * @example "netsuite-eu-1"
     */
    provider_code: string;
    provider_error: string | Record<string, any>;
}
export interface PaymentProviderErrorObject {
    /**
     * Unique identifier assigned to the payment provider within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the payment provider's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_payment_provider_id: string;
    /**
     * The name of payment provider
     * @example "Stripe Prod"
     */
    payment_provider_name: string;
    /**
     * Code of the payment provider
     * @example "stripe"
     */
    payment_provider_code: string;
    /**
     * The source of the error
     * @example "stripe"
     */
    source: "stripe";
    /**
     * The action that was being performed when the error occurred
     * @example "payment_provider.register_webhook"
     */
    action?: "payment_provider.register_webhook";
    provider_error: string | Record<string, any>;
}
export interface PaymentRequestPaymentFailureObject {
    /**
     * Unique identifier assigned to the payment request within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the payment request record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_payment_request_id: string;
    /**
     * List of unique identifiers assigned to the invoices within the Lago application. These IDs are exclusively created by Lago and serve as unique identifiers for the invoices records within the Lago system.
     * @example ["1a901a90-1a90-1a90-1a90-1a901a901a90"]
     */
    lago_invoice_ids: string[];
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /**
     * Unique identifier of the customer within the payment provider
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    provider_customer_id?: string;
    /**
     * The type of payment provider code
     * @example "stripe"
     */
    payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
    /**
     * Code of the payment provider
     * @example "Stripe Prod"
     */
    payment_provider_code?: string;
    provider_error?: string | Record<string, any>;
}
export type SubscriptionWithCustomerObject = SubscriptionObject & {
    plan: PlanObject;
    customer: CustomerObject;
};
export type SubscriptionWithThresholdObject = SubscriptionObject & {
    plan: PlanObject;
    customer: CustomerObject;
    usage_threshold: UsageThresholdObject;
    /** List of usage thresholds applicable to this subscription. */
    applicable_usage_thresholds?: ApplicableUsageThreshold[];
};
export type WalletTransactionObjectExtended = WalletTransactionObject & {
    wallet?: WalletObject;
};
export interface WalletTransactionPaymentFailureObject {
    /**
     * Unique identifier assigned to the wallet transaction within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet transaction's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_wallet_transaction_id: string;
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /**
     * Unique identifier of the customer within the payment provider
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    provider_customer_id?: string;
    /**
     * The type of payment provider code
     * @example "stripe"
     */
    payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
    /**
     * Code of the payment provider
     * @example "Stripe Prod"
     */
    payment_provider_code?: string;
    provider_error?: string | Record<string, any>;
}
export type CustomerPaymentProvidernErrorObject = CustomerPaymentProviderErrorObject;
export type QueryParamsType = Record<string | number, any>;
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
export interface FullRequestParams extends Omit<RequestInit, "body"> {
    /** set parameter to `true` for call `securityWorker` for this request */
    secure?: boolean;
    /** request path */
    path: string;
    /** content type of request body */
    type?: ContentType;
    /** query params */
    query?: QueryParamsType;
    /** format of response (i.e. response.json() -> format: "json") */
    format?: ResponseFormat;
    /** request body */
    body?: unknown;
    /** base url */
    baseUrl?: string;
    /** request cancellation token */
    cancelToken?: CancelToken;
}
export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
export interface ApiConfig<SecurityDataType = unknown> {
    baseUrl?: string;
    baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
    securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
    customFetch?: typeof fetch;
}
export interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
    data: D;
    error: E;
}
type CancelToken = Symbol | string | number;
export declare enum ContentType {
    Json = "application/json",
    FormData = "multipart/form-data",
    UrlEncoded = "application/x-www-form-urlencoded",
    Text = "text/plain"
}
export declare class HttpClient<SecurityDataType = unknown> {
    baseUrl: string;
    private securityData;
    private securityWorker?;
    private abortControllers;
    private customFetch;
    private baseApiParams;
    constructor(apiConfig?: ApiConfig<SecurityDataType>);
    setSecurityData: (data: SecurityDataType | null) => void;
    protected encodeQueryParam(key: string, value: any): string;
    protected addQueryParam(query: QueryParamsType, key: string): string;
    protected addArrayQueryParam(query: QueryParamsType, key: string): any;
    protected toQueryString(rawQuery?: QueryParamsType): string;
    protected addQueryParams(rawQuery?: QueryParamsType): string;
    private contentFormatters;
    protected mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams;
    protected createAbortSignal: (cancelToken: CancelToken) => AbortSignal | undefined;
    abortRequest: (cancelToken: CancelToken) => void;
    request: <T = any, E = any>({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise<HttpResponse<T, E>>;
}
/**
 * @title Lago API documentation
 * @version 1.45.2
 * @license AGPLv3 (https://github.com/getlago/lago-openapi/blob/main/LICENSE)
 * @baseUrl https://api.getlago.com/api/v1
 * @externalDocs https://github.com/getlago
 * @contact <tech@getlago.com>
 *
 * Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
 */
export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
    billingEntities: {
        /**
         * @description This endpoint returns a list of all billing entities in the organization
         *
         * @tags billing_entities
         * @name ListBillingEntities
         * @summary List all billing entities
         * @request GET:/billing_entities
         * @secure
         */
        listBillingEntities: (params?: RequestParams) => Promise<HttpResponse<{
            billing_entities: BillingEntityObject[];
        }, ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
        /**
         * @description This endpoint is used to create a new billing entity
         *
         * @tags billing_entities
         * @name CreateBillingEntity
         * @summary Create a billing entity
         * @request POST:/billing_entities
         * @secure
         */
        createBillingEntity: (data: BillingEntityCreateInput, params?: RequestParams) => Promise<HttpResponse<BillingEntityObject, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
        /**
         * @description This endpoint returns a specific billing entity by its code
         *
         * @tags billing_entities
         * @name GetBillingEntity
         * @summary Retrieve a billing entity
         * @request GET:/billing_entities/{code}
         * @secure
         */
        getBillingEntity: (code: string, params?: RequestParams) => Promise<HttpResponse<{
            billing_entity: BillingEntityObjectExtended;
        }, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to update an existing billing entity
         *
         * @tags billing_entities
         * @name UpdateBillingEntity
         * @summary Update a billing entity
         * @request PUT:/billing_entities/{code}
         * @secure
         */
        updateBillingEntity: (code: string, data: BillingEntityUpdateInput, params?: RequestParams) => Promise<HttpResponse<BillingEntityObjectExtended, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
    };
    activityLogs: {
        /**
         * @description This endpoint retrieves all existing activity logs that represent actions performed on application resources.
         *
         * @tags activity_logs
         * @name FindAllActivityLogs
         * @summary List all activity logs
         * @request GET:/activity_logs
         * @secure
         */
        findAllActivityLogs: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Filter activity logs from a specific date.
             * @format date
             * @example "2022-08-09"
             */
            from_date?: string;
            /**
             * Filter activity logs up to a specific date.
             * @format date
             * @example "2022-08-09"
             */
            to_date?: string;
            /**
             * Filter results by activity types
             * @example ["billing_metric.created","billing_metric.updated"]
             */
            "activity_types[]"?: string[];
            /**
             * Filter results by activity sources
             * @example ["api","front"]
             */
            "activity_sources[]"?: ("api" | "front" | "system")[];
            /**
             * Filter results by user emails
             * @example ["dinesh@piedpiper.test"]
             */
            "user_emails[]"?: string[];
            /**
             * Unique identifier assigned to the customer in your application.
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id?: string;
            /**
             * External subscription ID
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_subscription_id?: string;
            /**
             * Filter results by resources unique identifiers
             * @example ["5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba","1a901a90-1a90-1a90-1a90-1a901a901a90"]
             */
            "resource_ids[]"?: string[];
            /**
             * Filter results by resource class types
             * @example ["BillableMetric","Invoice"]
             */
            "resource_types[]"?: string[];
        }, params?: RequestParams) => Promise<HttpResponse<ActivityLogsPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint retrieves an existing activity log that represents an action performed on some resource. The activity log is identified by its unique activity_id.
         *
         * @tags activity_logs
         * @name FindActivityLog
         * @summary Retrieve an activity log
         * @request GET:/activity_logs/{activity_id}
         * @secure
         */
        findActivityLog: (activityId: string, params?: RequestParams) => Promise<HttpResponse<ActivityLog, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    addOns: {
        /**
         * @description This endpoint is used to create an add-on that can be then attached to a one-off invoice.
         *
         * @tags add_ons
         * @name CreateAddOn
         * @summary Create an add-on
         * @request POST:/add_ons
         * @secure
         */
        createAddOn: (data: AddOnCreateInput, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
        /**
         * @description This endpoint is used to list all existing add-ons.
         *
         * @tags add_ons
         * @name FindAllAddOns
         * @summary List all add-ons
         * @request GET:/add_ons
         * @secure
         */
        findAllAddOns: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
        }, params?: RequestParams) => Promise<HttpResponse<AddOnsPaginated, ApiErrorUnauthorized | ApiErrorForbidden>>;
        /**
         * @description This endpoint is used to update an existing add-on.
         *
         * @tags add_ons
         * @name UpdateAddOn
         * @summary Update an add-on
         * @request PUT:/add_ons/{code}
         * @secure
         */
        updateAddOn: (code: string, data: AddOnUpdateInput, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to retrieve a specific add-on.
         *
         * @tags add_ons
         * @name FindAddOn
         * @summary Retrieve an add-on
         * @request GET:/add_ons/{code}
         * @secure
         */
        findAddOn: (code: string, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to delete an existing add-on.
         *
         * @tags add_ons
         * @name DestroyAddOn
         * @summary Delete an add-on
         * @request DELETE:/add_ons/{code}
         * @secure
         */
        destroyAddOn: (code: string, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
    };
    apiLogs: {
        /**
         * @description This endpoint retrieves all existing api logs that represent requests performed to Lago's API.
         *
         * @tags api_logs
         * @name FindAllApiLogs
         * @summary List all api logs
         * @request GET:/api_logs
         * @secure
         */
        findAllApiLogs: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Filter api logs from a specific date.
             * @format date
             * @example "2022-08-09"
             */
            from_date?: string;
            /**
             * Filter api logs up to a specific date.
             * @format date
             * @example "2022-08-09"
             */
            to_date?: string;
            /**
             * Filter results by HTTP methods
             * @example ["post","put"]
             */
            "http_methods[]"?: ("post" | "put" | "delete")[];
            /**
             * Filter results by HTTP status or by generic request status
             * @example ["failed","succeeded",404]
             */
            "http_statuses[]"?: ("succeeded" | "failed" | number)[];
            /**
             * Filter results by API version
             * @example "v1"
             */
            api_version?: string;
            /**
             * Filter results by the path of the request
             * @example "/billable_metrics/"
             */
            request_paths?: string;
        }, params?: RequestParams) => Promise<HttpResponse<ApiLogsPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint retrieves an existing api log that represents a request made to the API. The api log is identified by its unique request_id.
         *
         * @tags api_logs
         * @name FindApiLog
         * @summary Retrieve an api log
         * @request GET:/api_logs/{request_id}
         * @secure
         */
        findApiLog: (requestId: string, params?: RequestParams) => Promise<HttpResponse<ApiLog, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    analytics: {
        /**
         * @description Gross revenue is the sum of monthly `finalized` invoice payments and fees paid in advance that are not invoiceable. This total is calculated after deducting taxes and discounts.
         *
         * @tags analytics
         * @name FindAllGrossRevenues
         * @summary List gross revenue
         * @request GET:/analytics/gross_revenue
         * @secure
         */
        findAllGrossRevenues: (query?: {
            /** Currency of revenue analytics. Format must be ISO 4217. */
            currency?: Currency;
            /**
             * The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level.
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id?: string;
            /**
             * Show data only for given number of months.
             * @example 12
             */
            months?: number;
        }, params?: RequestParams) => Promise<HttpResponse<GrossRevenues, ApiErrorUnauthorized | ApiErrorForbidden>>;
        /**
         * @description Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`.
         *
         * @tags analytics
         * @name FindAllInvoiceCollections
         * @summary List of finalized invoices
         * @request GET:/analytics/invoice_collection
         * @secure
         */
        findAllInvoiceCollections: (query?: {
            /** The currency of revenue analytics. Format must be ISO 4217. */
            currency?: Currency;
            /**
             * Show data only for given number of months.
             * @example 12
             */
            months?: number;
        }, params?: RequestParams) => Promise<HttpResponse<InvoiceCollections, ApiErrorUnauthorized>>;
        /**
         * @description Reports a monthly analysis focused on the revenue generated from all usage-based fees. It exclusively accounts for revenue that has been formally invoiced. Importantly, this report does not include revenue related to the usage in the current billing period, limiting its scope to previously invoiced amounts.
         *
         * @tags analytics
         * @name FindAllInvoicedUsages
         * @summary List usage revenue
         * @request GET:/analytics/invoiced_usage
         * @secure
         */
        findAllInvoicedUsages: (query?: {
            /** The currency of invoiced usage analytics. Format must be ISO 4217. */
            currency?: Currency;
            /**
             * Show data only for given number of months.
             * @example 12
             */
            months?: number;
        }, params?: RequestParams) => Promise<HttpResponse<InvoicedUsages, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint is used to list MRR.
         *
         * @tags analytics
         * @name FindAllMrrs
         * @summary List MRR
         * @request GET:/analytics/mrr
         * @secure
         */
        findAllMrrs: (query?: {
            /**
             * Quantifies the revenue generated from `subscription` fees on a monthly basis. This figure is calculated post-application of applicable taxes and deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle:
             *
             * - Revenue from `monthly` subscription invoices is included in the MRR for the month in which the invoice is issued.
             * - Revenue from `quarterly` subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next remaining months depending on calendar or anniversary billing) as well as to fees paid in arrears (allocated to the preceding months depending on calendar or anniversary billing).
             * - Revenue from `yearly` subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing).
             * - Revenue from `semiannual` subscription invoices is distributed evenly over six months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing).
             * - Revenue from `weekly` subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month.
             */
            currency?: Currency;
            /**
             * Show data only for given number of months.
             * @example 12
             */
            months?: number;
        }, params?: RequestParams) => Promise<HttpResponse<Mrrs, ApiErrorUnauthorized | ApiErrorForbidden>>;
        /**
         * @description Overdue balance is the total amount associated with overdue invoices (invoices with pending or failed payments which are past their due dates).
         *
         * @tags analytics
         * @name FindAllOverdueBalances
         * @summary List overdue balance
         * @request GET:/analytics/overdue_balance
         * @secure
         */
        findAllOverdueBalances: (query?: {
            /** Currency of revenue analytics. Format must be ISO 4217. */
            currency?: Currency;
            /**
             * The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level.
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id?: string;
            /**
             * Show data only for given number of months.
             * @example 12
             */
            months?: number;
        }, params?: RequestParams) => Promise<HttpResponse<OverdueBalances, ApiErrorUnauthorized | ApiErrorForbidden>>;
        /**
         * @description Returns usages.
         *
         * @tags analytics
         * @name FindAllUsages
         * @summary List usage
         * @request GET:/analytics/usage
         * @secure
         */
        findAllUsages: (query?: {
            /**
             * The time granularity of usage analytics. Possible values are 'daily', 'weekly', 'monthly', 'yearly'.
             * @example "monthly"
             */
            time_granularity?: "daily" | "weekly" | "monthly";
            /** The currency of usage analytics. Format must be ISO 4217. */
            currency?: Currency;
            /**
             * The start date of the period for which the usage analytics is calculated.
             * @format date
             * @example "2023-11-01"
             */
            from_date?: string;
            /**
             * The end date of the period for which the usage analytics is calculated.
             * @format date
             * @example "2023-11-30"
             */
            to_date?: string;
            /**
             * The type of customer for which the usage analytics is calculated. Possible values are 'individual', 'company'.
             * @example "individual"
             */
            customer_type?: "individual" | "company";
            /**
             * The external identifier of the customer for which the usage analytics is calculated.
             * @example "ext-customer-123"
             */
            external_customer_id?: string;
            /** The country of the customer for which the usage analytics is calculated. */
            customer_country?: Country;
            /**
             * The external identifier of the subscription for which the usage analytics is calculated.
             * @example "ext-subscription-123"
             */
            external_subscription_id?: string;
            /**
             * Indicates whether the billable metric associated with the usage is recurring.
             * @example true
             */
            is_billable_metric_recurring?: boolean;
            /**
             * The code of the plan for which the usage analytics is calculated.
             * @example "plan-code-123"
             */
            plan_code?: string;
            /**
             * The code of the usage-based billable metrics for which the usage analytics is calculated.
             * @example "code1"
             */
            billable_metric_code?: string;
        }, params?: RequestParams) => Promise<HttpResponse<Usages, ApiErrorUnauthorized>>;
    };
    appliedCoupons: {
        /**
         * @description This endpoint is used to apply a specific coupon to a customer, before or during a subscription.
         *
         * @tags coupons
         * @name ApplyCoupon
         * @summary Apply a coupon to a customer
         * @request POST:/applied_coupons
         * @secure
         */
        applyCoupon: (data: AppliedCouponInput, params?: RequestParams) => Promise<HttpResponse<AppliedCoupon, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to list all applied coupons. You can filter by coupon status and by customer.
         *
         * @tags coupons
         * @name FindAllAppliedCoupons
         * @summary List all applied coupons
         * @request GET:/applied_coupons
         * @secure
         */
        findAllAppliedCoupons: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * The status of the coupon. Can be either `active` or `terminated`.
             * @example "active"
             */
            status?: "active" | "terminated";
            /**
             * The customer external unique identifier (provided by your own application)
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id?: string;
            /**
             * The code of the coupon applied to the customer. Use it to filter applied coupons by their code.
             * @example ["BLACK_FRIDAY_2024","CHRISTMAS_2024"]
             */
            "coupon_code[]"?: string[];
        }, params?: RequestParams) => Promise<HttpResponse<AppliedCouponsPaginated, ApiErrorUnauthorized>>;
    };
    billableMetrics: {
        /**
         * @description This endpoint creates a new billable metric representing a pricing component of your application.
         *
         * @tags billable_metrics
         * @name CreateBillableMetric
         * @summary Create a billable metric
         * @request POST:/billable_metrics
         * @secure
         */
        createBillableMetric: (data: BillableMetricCreateInput, params?: RequestParams) => Promise<HttpResponse<BillableMetric, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
        /**
         * @description This endpoint retrieves all existing billable metrics that represent pricing components of your application.
         *
         * @tags billable_metrics
         * @name FindAllBillableMetrics
         * @summary List all billable metrics
         * @request GET:/billable_metrics
         * @secure
         */
        findAllBillableMetrics: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
        }, params?: RequestParams) => Promise<HttpResponse<BillableMetricsPaginated, ApiErrorUnauthorized>>;
        /**
         * @description Evaluate an expression for a billable metric creation by providing the expression and test data
         *
         * @tags billable_metrics
         * @name EvaluateBillableMetricExpression
         * @summary Evaluate an expression for a billable metric
         * @request POST:/billable_metrics/evaluate_expression
         * @secure
         */
        evaluateBillableMetricExpression: (data: BillableMetricEvaluateExpressionInput, params?: RequestParams) => Promise<HttpResponse<BillableMetricEvaluateExpressionResult, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
        /**
         * @description This endpoint updates an existing billable metric representing a pricing component of your application.
         *
         * @tags billable_metrics
         * @name UpdateBillableMetric
         * @summary Update a billable metric
         * @request PUT:/billable_metrics/{code}
         * @secure
         */
        updateBillableMetric: (code: string, data: BillableMetricUpdateInput, params?: RequestParams) => Promise<HttpResponse<BillableMetric, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint deletes an existing billable metric representing a pricing component of your application.
         *
         * @tags billable_metrics
         * @name DestroyBillableMetric
         * @summary Delete a billable metric
         * @request DELETE:/billable_metrics/{code}
         * @secure
         */
        destroyBillableMetric: (code: string, params?: RequestParams) => Promise<HttpResponse<BillableMetric, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves an existing billable metric that represents a pricing component of your application. The billable metric is identified by its unique code.
         *
         * @tags billable_metrics
         * @name FindBillableMetric
         * @summary Retrieve a billable metric
         * @request GET:/billable_metrics/{code}
         * @secure
         */
        findBillableMetric: (code: string, params?: RequestParams) => Promise<HttpResponse<BillableMetric, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    features: {
        /**
         * @description This endpoint creates a new feature representing an entitlement component of your application.
         *
         * @tags features
         * @name CreateFeature
         * @summary Create a feature
         * @request POST:/features
         * @secure
         */
        createFeature: (data: FeatureCreateInput, params?: RequestParams) => Promise<HttpResponse<Feature, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
        /**
         * @description This endpoint retrieves all existing features that represent entitlement components of your application.
         *
         * @tags features
         * @name FindAllFeatures
         * @summary List all features
         * @request GET:/features
         * @secure
         */
        findAllFeatures: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /** Search in name, code and description. */
            search_term?: string;
        }, params?: RequestParams) => Promise<HttpResponse<FeaturesPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint updates an existing feature representing an entitlement component of your application.
         *
         * @tags features
         * @name UpdateFeature
         * @summary Update a feature
         * @request PUT:/features/{code}
         * @secure
         */
        updateFeature: (code: string, data: FeatureUpdateInput, params?: RequestParams) => Promise<HttpResponse<Feature, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
        /**
         * @description This endpoint deletes an existing feature representing an entitlement component of your application. Deleting a feature will remove it from all plans and subscriptions.
         *
         * @tags features
         * @name DestroyFeature
         * @summary Delete a feature
         * @request DELETE:/features/{code}
         * @secure
         */
        destroyFeature: (code: string, params?: RequestParams) => Promise<HttpResponse<Feature, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves an existing feature that represents an entitlement component of your application. The feature is identified by its unique code.
         *
         * @tags features
         * @name FindFeature
         * @summary Retrieve a feature
         * @request GET:/features/{code}
         * @secure
         */
        findFeature: (code: string, params?: RequestParams) => Promise<HttpResponse<Feature, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description Delete privilege from feature. Deleting a privilege removes it from all plans and subscriptions.
         *
         * @tags features
         * @name DeleteFeaturePrivilege
         * @summary Delete a privilege. Deleting a privilege removes it from all plans and subscriptions.
         * @request DELETE:/features/{code}/privileges/{privilege_code}
         * @secure
         */
        deleteFeaturePrivilege: (code: string, privilegeCode: string, params?: RequestParams) => Promise<HttpResponse<Feature, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    coupons: {
        /**
         * @description This endpoint is used to create a coupon that can be then attached to a customer to create a discount.
         *
         * @tags coupons
         * @name CreateCoupon
         * @summary Create a coupon
         * @request POST:/coupons
         * @secure
         */
        createCoupon: (data: CouponCreateInput, params?: RequestParams) => Promise<HttpResponse<Coupon, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
        /**
         * @description This endpoint is used to list all existing coupons.
         *
         * @tags coupons
         * @name FindAllCoupons
         * @summary List all coupons
         * @request GET:/coupons
         * @secure
         */
        findAllCoupons: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
        }, params?: RequestParams) => Promise<HttpResponse<CouponsPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint is used to update a coupon that can be then attached to a customer to create a discount.
         *
         * @tags coupons
         * @name UpdateCoupon
         * @summary Update a coupon
         * @request PUT:/coupons/{code}
         * @secure
         */
        updateCoupon: (code: string, data: CouponUpdateInput, params?: RequestParams) => Promise<HttpResponse<Coupon, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to retrieve a specific coupon.
         *
         * @tags coupons
         * @name FindCoupon
         * @summary Retrieve a coupon
         * @request GET:/coupons/{code}
         * @secure
         */
        findCoupon: (code: string, params?: RequestParams) => Promise<HttpResponse<Coupon, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to delete a coupon.
         *
         * @tags coupons
         * @name DestroyCoupon
         * @summary Delete a coupon
         * @request DELETE:/coupons/{code}
         * @secure
         */
        destroyCoupon: (code: string, params?: RequestParams) => Promise<HttpResponse<Coupon, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    creditNotes: {
        /**
         * @description This endpoint creates a new credit note.
         *
         * @tags credit_notes
         * @name CreateCreditNote
         * @summary Create a credit note
         * @request POST:/credit_notes
         * @secure
         */
        createCreditNote: (data: CreditNoteCreateInput, params?: RequestParams) => Promise<HttpResponse<CreditNoteExtended, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
        /**
         * @description This endpoint list all existing credit notes.
         *
         * @tags credit_notes
         * @name FindAllCreditNotes
         * @summary List all credit notes
         * @request GET:/credit_notes
         * @secure
         */
        findAllCreditNotes: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Unique identifier assigned to the customer in your application.
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id?: string;
            /**
             * Filter credit notes starting from a specific date.
             * @format date
             * @example "2022-07-08"
             */
            issuing_date_from?: string;
            /**
             * Filter credit notes up to a specific date.
             * @format date
             * @example "2022-08-09"
             */
            issuing_date_to?: string;
            /**
             * Search credit notes by id, number, customer name, customer external_id or customer email.
             * @example "Jane"
             */
            search_term?: string;
            /**
             * Filter credit notes by currency. Possible values ISO 4217 currency codes.
             * @example "EUR"
             */
            currency?: string;
            /** Filter credit notes by reasons. Possible values are `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge`, `duplicated_charge` or `other`. */
            reason?: "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "duplicated_charge" | "other";
            /** Filter credit notes by credit status. Possible values are `available`, `consumed`  or `voided`. */
            credit_status?: "available" | "consumed" | "voided";
            /** Filter credit notes by refund status. Possible values are `pending`, `succeeded`  or `failed`. */
            refund_status?: "pending" | "succeeded" | "failed";
            /**
             * Filter credit notes by their related invoice number.
             * @example "INV-001-002"
             */
            invoice_number?: string;
            /**
             * Filter credit notes of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
             * @example 9000
             */
            amount_from?: number;
            /**
             * Filter credit notes up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
             * @example 100000
             */
            amount_to?: number;
            /**
             * Filter credit notes belonging to a self billed invoice. Possible values are `true` or `false`.
             * @example true
             */
            self_billed?: boolean;
            /**
             * Filter credit notes by billing entity codes.
             * @example ["billing_entity_code_1","billing_entity_code_2"]
             */
            "billing_entity_codes[]"?: string[];
        }, params?: RequestParams) => Promise<HttpResponse<CreditNotesPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint updates an existing credit note.
         *
         * @tags credit_notes
         * @name UpdateCreditNote
         * @summary Update a credit note
         * @request PUT:/credit_notes/{lago_id}
         * @secure
         */
        updateCreditNote: (lagoId: string, data: CreditNoteUpdateInput, params?: RequestParams) => Promise<HttpResponse<CreditNoteExtended, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves an existing credit note.
         *
         * @tags credit_notes
         * @name FindCreditNote
         * @summary Retrieve a credit note
         * @request GET:/credit_notes/{lago_id}
         * @secure
         */
        findCreditNote: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<CreditNoteExtended, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint downloads the PDF of an existing credit note.
         *
         * @tags credit_notes
         * @name DownloadCreditNote
         * @summary Download a credit note PDF
         * @request POST:/credit_notes/{lago_id}/download
         * @secure
         */
        downloadCreditNote: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<CreditNote, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint allows you to retrieve amounts for a new credit note creation.
         *
         * @tags credit_notes
         * @name EstimateCreditNote
         * @summary Estimate amounts for a new credit note
         * @request POST:/credit_notes/estimate
         * @secure
         */
        estimateCreditNote: (data: CreditNoteEstimateInput, params?: RequestParams) => Promise<HttpResponse<CreditNoteEstimated, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
        /**
         * @description This endpoint voids the available credit linked to a specific credit note.
         *
         * @tags credit_notes
         * @name VoidCreditNote
         * @summary Void available credit
         * @request PUT:/credit_notes/{lago_id}/void
         * @secure
         */
        voidCreditNote: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<CreditNoteExtended, ApiErrorUnauthorized | ApiErrorNotFound | ApiErrorNotAllowed>>;
        /**
         * @description This endpoint replaces all existing metadata on a credit note with the provided key-value pairs. Any existing metadata keys not included in the request will be removed.
         *
         * @tags credit_notes
         * @name ReplaceCreditNoteMetadata
         * @summary Replace credit note metadata
         * @request POST:/credit_notes/{lago_id}/metadata
         * @secure
         */
        replaceCreditNoteMetadata: (lagoId: string, data: CreditNoteMetadataResponse, params?: RequestParams) => Promise<HttpResponse<CreditNoteMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint merges the provided metadata with existing metadata on the credit note. Existing keys not in the request are preserved. New keys are added, existing keys are updated.
         *
         * @tags credit_notes
         * @name MergeCreditNoteMetadata
         * @summary Merge credit note metadata
         * @request PATCH:/credit_notes/{lago_id}/metadata
         * @secure
         */
        mergeCreditNoteMetadata: (lagoId: string, data: CreditNoteMetadataResponse, params?: RequestParams) => Promise<HttpResponse<CreditNoteMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint removes all metadata from a credit note.
         *
         * @tags credit_notes
         * @name DeleteAllCreditNoteMetadata
         * @summary Delete all credit note metadata
         * @request DELETE:/credit_notes/{lago_id}/metadata
         * @secure
         */
        deleteAllCreditNoteMetadata: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<CreditNoteMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint removes a single metadata key from a credit note.
         *
         * @tags credit_notes
         * @name DeleteCreditNoteMetadataKey
         * @summary Delete a metadata key
         * @request DELETE:/credit_notes/{lago_id}/metadata/{key}
         * @secure
         */
        deleteCreditNoteMetadataKey: (lagoId: string, key: string, params?: RequestParams) => Promise<HttpResponse<CreditNoteMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    customers: {
        /**
         * @description This endpoint creates a new customer.
         *
         * @tags customers
         * @name CreateCustomer
         * @summary Create a customer
         * @request POST:/customers
         * @secure
         */
        createCustomer: (data: CustomerCreateInput, params?: RequestParams) => Promise<HttpResponse<Customer, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
        /**
         * @description This endpoint retrieves all existing customers.
         *
         * @tags customers
         * @name FindAllCustomers
         * @summary List all customers
         * @request GET:/customers
         * @secure
         */
        findAllCustomers: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Filter customers by account type.
             * @example ["customer","partner"]
             */
            "account_type[]"?: ("customer" | "partner")[];
            /**
             * Filter customers by billing entity codes.
             * @example ["billing_entity_code_1","billing_entity_code_2"]
             */
            "billing_entity_codes[]"?: string[];
            /**
             * Filter customers by search term. This will filter all customers whose name, firstname, lastname, legal name, external id or email contain the search term.
             * @example "John Doe"
             */
            search_term?: string;
            /**
             * Filter customers by countries. Possible values are the ISO 3166-1 alpha-2 codes.
             * @example ["US","FR"]
             */
            "countries[]"?: Country[];
            /**
             * Filter customers by states.
             * @example ["CA","Paris"]
             */
            "states[]"?: string[];
            /**
             * Filter customers by zipcodes.
             * @example ["10115","75001"]
             */
            "zipcodes[]"?: string[];
            /**
             * Filter customers by currencies.
             * @example ["USD","EUR"]
             */
            "currencies[]"?: Currency[];
            /**
             * Filter customers by whether they have a tax identification number or not.
             * @example true
             */
            has_tax_identification_number?: boolean;
            /**
             * Filter customers by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. Providing empty value will search for customers without given metadata key. For example, `metadata[is_synced]=true&metadata[last_synced_at]=`.
             * @example "value"
             */
            "metadata[key]"?: string;
            /**
             * Filter customers by customer type.
             * @example "company"
             */
            customer_type?: "company" | "individual";
            /**
             * Filter customers by whether they have a customer type or not.
             * @example true
             */
            has_customer_type?: boolean;
        }, params?: RequestParams) => Promise<HttpResponse<CustomersPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint retrieves an existing customer.
         *
         * @tags customers
         * @name FindCustomer
         * @summary Retrieve a customer
         * @request GET:/customers/{external_customer_id}
         * @secure
         */
        findCustomer: (externalCustomerId: string, params?: RequestParams) => Promise<HttpResponse<Customer, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint deletes an existing customer.
         *
         * @tags customers
         * @name DestroyCustomer
         * @summary Delete a customer
         * @request DELETE:/customers/{external_customer_id}
         * @secure
         */
        destroyCustomer: (externalCustomerId: string, params?: RequestParams) => Promise<HttpResponse<Customer, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to list all applied coupons for a customer.
         *
         * @tags customers, coupons
         * @name FindAllCustomerAppliedCoupons
         * @summary List all customer's applied coupons
         * @request GET:/customers/{external_customer_id}/applied_coupons
         * @secure
         */
        findAllCustomerAppliedCoupons: (externalCustomerId: string, query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * The status of the coupon. Can be either `active` or `terminated`.
             * @example "active"
             */
            status?: "active" | "terminated";
            /**
             * The code of the coupon applied to the customer. Use it to filter applied coupons by their code.
             * @example ["BLACK_FRIDAY_2024","CHRISTMAS_2024"]
             */
            "coupon_code[]"?: string[];
        }, params?: RequestParams) => Promise<HttpResponse<AppliedCouponsPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to delete a specific coupon that has been applied to a customer.
         *
         * @tags coupons, customers
         * @name DeleteAppliedCoupon
         * @summary Delete an applied coupon
         * @request DELETE:/customers/{external_customer_id}/applied_coupons/{applied_coupon_id}
         * @secure
         */
        deleteAppliedCoupon: (externalCustomerId: string, appliedCouponId: string, params?: RequestParams) => Promise<HttpResponse<AppliedCoupon, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint list all existing credit notes for a customer.
         *
         * @tags customers, credit_notes
         * @name FindAllCustomerCreditNotes
         * @summary List all customer's credit notes
         * @request GET:/customers/{external_customer_id}/credit_notes
         * @secure
         */
        findAllCustomerCreditNotes: (externalCustomerId: string, query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Filter credit notes starting from a specific date.
             * @format date
             * @example "2022-07-08"
             */
            issuing_date_from?: string;
            /**
             * Filter credit notes up to a specific date.
             * @format date
             * @example "2022-08-09"
             */
            issuing_date_to?: string;
            /**
             * Search credit notes by id, number, customer name, customer external_id or customer email.
             * @example "Jane"
             */
            search_term?: string;
            /** Filter credit notes by reasons. Possible values are `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge`, `duplicated_charge` or `other`. */
            reason?: "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "duplicated_charge" | "other";
            /** Filter credit notes by credit status. Possible values are `available`, `consumed`  or `voided`. */
            credit_status?: "available" | "consumed" | "voided";
            /** Filter credit notes by refund status. Possible values are `pending`, `succeeded`  or `failed`. */
            refund_status?: "pending" | "succeeded" | "failed";
            /**
             * Filter credit notes by their related invoice number.
             * @example "INV-001-002"
             */
            invoice_number?: string;
            /**
             * Filter credit notes of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
             * @example 9000
             */
            amount_from?: number;
            /**
             * Filter credit notes up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
             * @example 100000
             */
            amount_to?: number;
            /**
             * Filter credit notes belonging to a self billed invoice. Possible values are `true` or `false`.
             * @example true
             */
            self_billed?: boolean;
        }, params?: RequestParams) => Promise<HttpResponse<CreditNotesPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for retrieving all invoices of a customer.
         *
         * @tags customers, invoices
         * @name FindAllCustomerInvoices
         * @summary List all customer's invoices
         * @request GET:/customers/{external_customer_id}/invoices
         * @secure
         */
        findAllCustomerInvoices: (externalCustomerId: string, query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Filter invoices of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
             * @example 9000
             */
            amount_from?: number;
            /**
             * Filter invoices up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
             * @example 100000
             */
            amount_to?: number;
            /**
             * Filter invoices starting from a specific date.
             * @format date
             * @example "2022-07-08"
             */
            issuing_date_from?: string;
            /**
             * Filter invoices up to a specific date.
             * @format date
             * @example "2022-08-09"
             */
            issuing_date_to?: string;
            /** Filter invoices by status. Possible values are `draft` or `finalized`. */
            status?: "draft" | "finalized";
            /** Filter invoices by payment status. Possible values are `pending`, `failed` or `succeeded`. */
            payment_status?: "pending" | "failed" | "succeeded";
            /**
             * Filter invoices by payment_overdue. Possible values are `true` or `false`.
             * @example true
             */
            payment_overdue?: boolean;
            /**
             * Search invoices by id, number, customer name, customer external_id or customer email.
             * @example "Jane"
             */
            search_term?: string;
            /**
             * Filter invoices with a payment dispute lost. Possible values are `true` or `false`.
             * @example true
             */
            payment_dispute_lost?: boolean;
            /** Filter invoices by invoice type. Possible values are `subscription`, `add_on`, `credit`, `one_off`, `advance_charges` or `progressive_billing`. */
            invoice_type?: "subscription" | "add_on" | "credit" | "one_off" | "advance_charges" | "progressive_billing";
            /**
             * Filter invoices by self billed. Possible values are `true` or `false`.
             * @example true
             */
            self_billed?: boolean;
            /**
             * Filter invoices by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. Providing empty value will search for invoice without given metadata key. For example, `metadata[color]=blue`.
             * @example "someValue"
             */
            "metadata[key]"?: string;
        }, params?: RequestParams) => Promise<HttpResponse<InvoicesPaginated, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to list all payments of a customer
         *
         * @tags customers, payments
         * @name FindAllCustomerPayments
         * @summary List all customer's payments
         * @request GET:/customers/{external_customer_id}/payments
         * @secure
         */
        findAllCustomerPayments: (externalCustomerId: string, query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            invoice_id?: string;
        }, params?: RequestParams) => Promise<HttpResponse<PaymentsPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to list all existing payment requests of a customer.
         *
         * @tags customers, payment_requests
         * @name FindAllCustomerPaymentRequests
         * @summary List all customer's payment requests
         * @request GET:/customers/{external_customer_id}/payment_requests
         * @secure
         */
        findAllCustomerPaymentRequests: (externalCustomerId: string, query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Filter by payment status. Possible values are `pending`, `failed` or `succeeded`.
             * @example "pending"
             */
            payment_status?: "pending" | "failed" | "succeeded";
        }, params?: RequestParams) => Promise<HttpResponse<PaymentRequestsPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description Retrieves an embeddable link for displaying a customer portal. This endpoint allows you to fetch the URL that can be embedded to provide customers access to a dedicated portal
         *
         * @tags customers
         * @name GetCustomerPortalUrl
         * @summary Get a customer portal URL
         * @request GET:/customers/{external_customer_id}/portal_url
         * @secure
         */
        getCustomerPortalUrl: (externalCustomerId: string, params?: RequestParams) => Promise<HttpResponse<{
            customer: {
                /**
                 * An embeddable link for displaying a customer portal
                 * @example "https://app.lago.com/customer-portal/1234567890"
                 */
                portal_url: string;
            };
        }, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves all active subscriptions for a customer.
         *
         * @tags customers, subscriptions
         * @name FindAllCustomerSubscriptions
         * @summary List all customer's subscriptions
         * @request GET:/customers/{external_customer_id}/subscriptions
         * @secure
         */
        findAllCustomerSubscriptions: (externalCustomerId: string, query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * The unique code representing the plan to be attached to the customer. This code must correspond to the code property of one of the active plans.
             * @example "premium"
             */
            plan_code?: string;
            /**
             * If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`.
             * @example ["active","pending"]
             */
            "status[]"?: ("pending" | "canceled" | "terminated" | "active")[];
        }, params?: RequestParams) => Promise<HttpResponse<SubscriptionsPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to create a wallet with prepaid credits.
         *
         * @tags wallets
         * @name CreateCustomerWallet
         * @summary Create a wallet
         * @request POST:/customers/{external_customer_id}/wallets
         * @secure
         */
        createCustomerWallet: (externalCustomerId: string, data: WalletCreateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
        /**
         * @description This endpoint is used to list all wallets with prepaid credits of a customer
         *
         * @tags wallets
         * @name FindAllCustomerWallets
         * @summary List all customer's wallets
         * @request GET:/customers/{external_customer_id}/wallets
         * @secure
         */
        findAllCustomerWallets: (externalCustomerId: string, query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
        }, params?: RequestParams) => Promise<HttpResponse<WalletsPaginated, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to update an existing wallet with prepaid credits.
         *
         * @tags wallets
         * @name UpdateCustomerWallet
         * @summary Update a wallet
         * @request PUT:/customers/{external_customer_id}/wallets/{code}
         * @secure
         */
        updateCustomerWallet: (externalCustomerId: string, code: string, data: WalletUpdateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to retrieve an existing wallet with prepaid credits.
         *
         * @tags wallets
         * @name FindCustomerWallet
         * @summary Retrieve a wallet
         * @request GET:/customers/{external_customer_id}/wallets/{code}
         * @secure
         */
        findCustomerWallet: (externalCustomerId: string, code: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to terminate an existing wallet with prepaid credits.
         *
         * @tags wallets
         * @name DestroyCustomerWallet
         * @summary Terminate a wallet
         * @request DELETE:/customers/{external_customer_id}/wallets/{code}
         * @secure
         */
        destroyCustomerWallet: (externalCustomerId: string, code: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden | ApiErrorNotFound>>;
        /**
         * @description This endpoint replaces all existing metadata on a wallet with the provided key-value pairs. Any existing metadata keys not included in the request will be removed.
         *
         * @tags wallets
         * @name ReplaceCustomerWalletMetadata
         * @summary Replace wallet metadata
         * @request POST:/customers/{external_customer_id}/wallets/{wallet_code}/metadata
         * @secure
         */
        replaceCustomerWalletMetadata: (externalCustomerId: string, walletCode: string, data: WalletMetadataResponse, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint merges the provided metadata with existing metadata on the wallet. Existing keys not in the request are preserved. New keys are added, existing keys are updated.
         *
         * @tags wallets
         * @name MergeCustomerWalletMetadata
         * @summary Merge wallet metadata
         * @request PATCH:/customers/{external_customer_id}/wallets/{wallet_code}/metadata
         * @secure
         */
        mergeCustomerWalletMetadata: (externalCustomerId: string, walletCode: string, data: WalletMetadataResponse, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint removes all metadata from a wallet.
         *
         * @tags wallets
         * @name DeleteAllCustomerWalletMetadata
         * @summary Delete all wallet metadata
         * @request DELETE:/customers/{external_customer_id}/wallets/{wallet_code}/metadata
         * @secure
         */
        deleteAllCustomerWalletMetadata: (externalCustomerId: string, walletCode: string, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint removes a single metadata key from a wallet.
         *
         * @tags wallets
         * @name DeleteCustomerWalletMetadataKey
         * @summary Delete a metadata key
         * @request DELETE:/customers/{external_customer_id}/wallets/{wallet_code}/metadata/{key}
         * @secure
         */
        deleteCustomerWalletMetadataKey: (externalCustomerId: string, walletCode: string, key: string, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint enables the retrieval of all alerts for a wallet.
         *
         * @tags wallets
         * @name GetCustomerWalletAlerts
         * @summary List wallet alerts
         * @request GET:/customers/{external_customer_id}/wallets/{wallet_code}/alerts
         * @secure
         */
        getCustomerWalletAlerts: (externalCustomerId: string, walletCode: string, params?: RequestParams) => Promise<HttpResponse<WalletAlerts, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint allows you to create new alerts for a wallet. Send a single alert object wrapped in `alert` key to create one alert, or an array of alert objects wrapped in `alerts` key to create multiple alerts atomically.
         *
         * @tags wallets
         * @name CreateCustomerWalletAlert
         * @summary Create wallet alert(s)
         * @request POST:/customers/{external_customer_id}/wallets/{wallet_code}/alerts
         * @secure
         */
        createCustomerWalletAlert: (externalCustomerId: string, walletCode: string, data: WalletAlertCreateInput | WalletAlertBatchCreateInput, params?: RequestParams) => Promise<HttpResponse<WalletAlerts | WalletAlert, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint allows you to delete all alerts for a wallet.
         *
         * @tags wallets
         * @name DeleteAllCustomerWalletAlerts
         * @summary Delete all wallet alerts
         * @request DELETE:/customers/{external_customer_id}/wallets/{wallet_code}/alerts
         * @secure
         */
        deleteAllCustomerWalletAlerts: (externalCustomerId: string, walletCode: string, params?: RequestParams) => Promise<HttpResponse<void, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint enables the retrieval of a specific alert for a wallet.
         *
         * @tags wallets
         * @name GetCustomerWalletAlert
         * @summary Retrieve a wallet alert
         * @request GET:/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}
         * @secure
         */
        getCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, params?: RequestParams) => Promise<HttpResponse<WalletAlert, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint allows you to update an existing alert for a wallet.
         *
         * @tags wallets
         * @name UpdateCustomerWalletAlert
         * @summary Update a wallet alert
         * @request PUT:/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}
         * @secure
         */
        updateCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, data: WalletAlertUpdateInput, params?: RequestParams) => Promise<HttpResponse<WalletAlert, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint allows you to delete an existing alert for a wallet.
         *
         * @tags wallets
         * @name DeleteCustomerWalletAlert
         * @summary Delete a wallet alert
         * @request DELETE:/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}
         * @secure
         */
        deleteCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, params?: RequestParams) => Promise<HttpResponse<WalletAlert, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint enables the retrieval of the usage-based billing data for a customer within the current period.
         *
         * @tags customers
         * @name FindCustomerCurrentUsage
         * @summary Retrieve customer current usage
         * @request GET:/customers/{external_customer_id}/current_usage
         * @secure
         */
        findCustomerCurrentUsage: (externalCustomerId: string, query: {
            /**
             * The unique identifier of the subscription within your application.
             * @example "sub_1234567890"
             */
            external_subscription_id: string;
            /**
             * Optional flag to determine if taxes should be applied. Defaults to `true` if not provided or if null.
             * @default true
             * @example true
             */
            apply_taxes?: boolean;
            /**
             * Filter usage to a specific charge by its Lago ID (UUID). Replaces deprecated `filter_by_charge_id`.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            charge_id?: string;
            /**
             * Filter usage to a specific charge by its code. Replaces deprecated `filter_by_charge_code`.
             * @example "storage"
             */
            charge_code?: string;
            /**
             * Filter usage to a specific billable metric by its code.
             * @example "storage"
             */
            billable_metric_code?: string;
            /**
             * Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. `group[cloud]=aws`. Replaces deprecated `filter_by_group`.
             * @example {"cloud":"aws"}
             */
            group?: Record<string, string>;
            /**
             * Filter usage to a specific charge by its Lago ID (UUID).
             * @deprecated
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            filter_by_charge_id?: string;
            /**
             * Filter usage to a specific charge by its code.
             * @deprecated
             * @example "storage"
             */
            filter_by_charge_code?: string;
            /**
             * Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. `filter_by_group[cloud]=aws`.
             * @deprecated
             * @example {"cloud":"aws"}
             */
            filter_by_group?: Record<string, string>;
            /**
             * When `true`, returns usage since subscription start instead of the current billing period. Requires one of `charge_id`, `charge_code`, `group` (or their deprecated `filter_by_*` equivalents) to be set.
             * @default false
             * @example true
             */
            full_usage?: boolean;
        }, params?: RequestParams) => Promise<HttpResponse<CustomerUsage, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint enables the retrieval of the usage-based billing data for a customer within the current period. It also returns the projected usage for the current period based on the current usage.
         *
         * @tags customers
         * @name FindCustomerProjectedUsage
         * @summary Retrieve customer current and projected usage
         * @request GET:/customers/{external_customer_id}/projected_usage
         * @secure
         */
        findCustomerProjectedUsage: (externalCustomerId: string, query: {
            /**
             * The unique identifier of the subscription within your application.
             * @example "sub_1234567890"
             */
            external_subscription_id: string;
            /**
             * Optional flag to determine if taxes should be applied. Defaults to `true` if not provided or if null.
             * @default true
             * @example true
             */
            apply_taxes?: boolean;
        }, params?: RequestParams) => Promise<HttpResponse<CustomerProjectedUsage, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
        /**
         * @description This endpoint enables the retrieval of the usage-based billing data for a customer within past periods.
         *
         * @tags customers
         * @name FindAllCustomerPastUsage
         * @summary Retrieve customer past usage
         * @request GET:/customers/{external_customer_id}/past_usage
         * @secure
         */
        findAllCustomerPastUsage: (externalCustomerId: string, query: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * The unique identifier of the subscription within your application.
             * @example "sub_1234567890"
             */
            external_subscription_id: string;
            /**
             * Billable metric code filter to apply to the charge usage
             * @example "cpu"
             */
            billable_metric_code?: string;
            /**
             * Number of past billing period to returns in the result
             * @example 5
             */
            periods_count?: number;
        }, params?: RequestParams) => Promise<HttpResponse<CustomerPastUsage, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint regenerates the Payment Provider Checkout URL of a Customer.
         *
         * @tags customers
         * @name GenerateCustomerCheckoutUrl
         * @summary Generate a Customer Payment Provider Checkout URL
         * @request POST:/customers/{external_customer_id}/checkout_url
         * @secure
         */
        generateCustomerCheckoutUrl: (externalCustomerId: string, params?: RequestParams) => Promise<HttpResponse<{
            customer: CustomerCheckoutUrl;
        }, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves all payment methods of a Customer.
         *
         * @tags payment_methods
         * @name FindAllCustomersPaymentMethods
         * @summary List all customer payment methods
         * @request GET:/customers/{external_customer_id}/payment_methods
         * @secure
         */
        findAllCustomersPaymentMethods: (externalCustomerId: string, query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
        }, params?: RequestParams) => Promise<HttpResponse<PaymentMethodsPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description Use the payment method as default when not selected a payment method
         *
         * @tags payment_methods
         * @name PaymentMethodSetAsDefault
         * @summary Set the payment method as default
         * @request PUT:/customers/{external_customer_id}/payment_methods/{lago_id}/set_as_default
         * @secure
         */
        paymentMethodSetAsDefault: (lagoId: string, externalCustomerId: string, params?: RequestParams) => Promise<HttpResponse<PaymentMethod, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint deletes a specific payment method for a customer.
         *
         * @tags payment_methods
         * @name DestroyPaymentMethod
         * @summary Delete a payment method
         * @request DELETE:/customers/{external_customer_id}/payment_methods/{lago_id}
         * @secure
         */
        destroyPaymentMethod: (lagoId: string, externalCustomerId: string, params?: RequestParams) => Promise<HttpResponse<PaymentMethod, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    events: {
        /**
         * @description This endpoint is used for transmitting usage measurement events to either a designated customer or a specific subscription.
         *
         * @tags events
         * @name CreateEvent
         * @summary Send usage events
         * @request POST:/events
         * @secure
         */
        createEvent: (data: EventInput, params?: RequestParams) => Promise<HttpResponse<EventCreated, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
        /**
         * @description This endpoint is used for retrieving all events.
         *
         * @tags events
         * @name FindAllEvents
         * @summary List all events
         * @request GET:/events
         * @secure
         */
        findAllEvents: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * External subscription ID
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_subscription_id?: string;
            /**
             * Filter events by its code.
             * @example "event-123"
             */
            code?: string;
            /**
             * Requires `external_subscription_id` to be set. Filter events by timestamp after the subscription started at datetime.
             * @example true
             */
            timestamp_from_started_at?: boolean;
            /**
             * Filter events by timestamp starting from a specific date.
             * @format date-time
             * @example "2022-08-08T00:00:00Z"
             */
            timestamp_from?: string;
            /**
             * Filter events by timestamp up to a specific date.
             * @format date-time
             * @example "2022-08-08T00:00:00Z"
             */
            timestamp_to?: string;
        }, params?: RequestParams) => Promise<HttpResponse<EventsPaginated, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden>>;
        /**
         * @description This endpoint can be used to send a batch of usage records. Each request may include up to 100 events.
         *
         * @tags events
         * @name CreateBatchEvents
         * @summary Batch multiple events
         * @request POST:/events/batch
         * @secure
         */
        createBatchEvents: (data: EventBatchInput, params?: RequestParams) => Promise<HttpResponse<EventsCreated, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
        /**
         * @description Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance charges
         *
         * @tags events
         * @name EventEstimateFees
         * @summary Estimate fees for a pay in advance charge
         * @request POST:/events/estimate_fees
         * @secure
         */
        eventEstimateFees: (data: EventEstimateFeesInput, params?: RequestParams) => Promise<HttpResponse<Fees, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
        /**
         * @description Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance standard or percentage charges
         *
         * @tags events
         * @name EventEstimateInstantFees
         * @summary Estimate instant fees for a pay in advance charge
         * @request POST:/events/estimate_instant_fees
         * @secure
         */
        eventEstimateInstantFees: (data: EventEstimateInstantFeesInput, params?: RequestParams) => Promise<HttpResponse<FeesEstimate, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
        /**
         * @description Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance standard or percentage charges
         *
         * @tags events
         * @name EventBatchEstimateInstantFees
         * @summary Batch estimate instant fees for a pay in advance charge
         * @request POST:/events/batch_estimate_instant_fees
         * @secure
         */
        eventBatchEstimateInstantFees: (data: EventBatchEstimateInstantFeesInput, params?: RequestParams) => Promise<HttpResponse<FeesEstimate, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription. Note that transaction_id is unique per external_subscription_id so multiple subscriptions can share the same transaction_id. This endpoint will only return the first event found with the given transaction_id. WARNING: If your Lago organization is configured to use the Clickhouse-based event pipeline, multiple events can share the same `transaction_id` (with different timestamps). This endpoint will only return the first event found.
         *
         * @tags events
         * @name FindEvent
         * @summary Retrieve a specific event
         * @request GET:/events/{transaction_id}
         * @secure
         */
        findEvent: (transactionId: string, params?: RequestParams) => Promise<HttpResponse<Event, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
    };
    fees: {
        /**
         * @description This endpoint is used for retrieving all fees that has been issued.
         *
         * @tags fees
         * @name FindAllFees
         * @summary List all fees
         * @request GET:/fees
         * @secure
         */
        findAllFees: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Unique identifier assigned to the customer in your application.
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id?: string;
            /**
             * External subscription ID
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_subscription_id?: string;
            /**
             * Filter results by event transaction ID
             * @example "et_12345678"
             */
            event_transaction_id?: string;
            /** Filter results by fee"s currency. */
            currency?: Currency;
            /**
             * The fee type. Possible values are `add-on`, `charge`, `credit`, `subscription` or "commitment".
             * @example "charge"
             */
            fee_type?: "charge" | "add_on" | "subscription" | "credit" | "commitment";
            /**
             * Filter results by the `code` of the billable metric attached to the fee. Only applies to `charge` types.
             * @example "bm_code"
             */
            billable_metric_code?: string;
            /**
             * Indicates the payment status of the fee. It represents the current status of the payment associated with the fee. The possible values for this field are `pending`, `succeeded`, `failed` and refunded`.
             * @example "succeeded"
             */
            payment_status?: "pending" | "succeeded" | "failed" | "refunded";
            /**
             * Filter results created after creation date and time in UTC.
             * @format date-time
             * @example "2023-03-28T12:21:51Z"
             */
            created_at_from?: string;
            /**
             * Filter results created before creation date and time in UTC.
             * @format date-time
             * @example "2023-03-28T12:21:51Z"
             */
            created_at_to?: string;
            /**
             * Filter results with payment success after creation date and time in UTC.
             * @format date-time
             * @example "2023-03-28T12:21:51Z"
             */
            succeeded_at_from?: string;
            /**
             * Filter results with payment success after creation date and time in UTC.
             * @format date-time
             * @example "2023-03-28T12:21:51Z"
             */
            succeeded_at_to?: string;
            /**
             * Filter results with payment failure after creation date and time in UTC.
             * @format date-time
             * @example "2023-03-28T12:21:51Z"
             */
            failed_at_from?: string;
            /**
             * Filter results with payment failure after creation date and time in UTC.
             * @format date-time
             * @example "2023-03-28T12:21:51Z"
             */
            failed_at_to?: string;
            /**
             * Filter results with payment refund after creation date and time in UTC.
             * @format date-time
             * @example "2023-03-28T12:21:51Z"
             */
            refunded_at_from?: string;
            /**
             * Filter results with payment refund after creation date and time in UTC.
             * @format date-time
             * @example "2023-03-28T12:21:51Z"
             */
            refunded_at_to?: string;
        }, params?: RequestParams) => Promise<HttpResponse<FeesPaginated, ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
        /**
         * @description This endpoint is used for retrieving a specific fee that has been issued.
         *
         * @tags fees
         * @name FindFee
         * @summary Retrieve a specific fee
         * @request GET:/fees/{lago_id}
         * @secure
         */
        findFee: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Fee, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for updating a specific fee that has been issued.
         *
         * @tags fees
         * @name UpdateFee
         * @summary Update a fee
         * @request PUT:/fees/{lago_id}
         * @secure
         */
        updateFee: (lagoId: string, data: FeeUpdateInput, params?: RequestParams) => Promise<HttpResponse<Fee, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound | ApiErrorNotAllowed>>;
        /**
         * @description This endpoint is used for deleting a specific fee that has not yet been invoiced
         *
         * @tags fees
         * @name DeleteFee
         * @summary Delete a fee
         * @request DELETE:/fees/{lago_id}
         * @secure
         */
        deleteFee: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Fee, ApiErrorUnauthorized | ApiErrorNotFound | ApiErrorNotAllowed>>;
    };
    invoices: {
        /**
         * @description This endpoint is used for issuing a one-off invoice.
         *
         * @tags invoices
         * @name CreateInvoice
         * @summary Create a one-off invoice
         * @request POST:/invoices
         * @secure
         */
        createInvoice: (data: InvoiceOneOffCreateInput, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
        /**
         * @description This endpoint is used for retrieving all invoices.
         *
         * @tags invoices
         * @name FindAllInvoices
         * @summary List all invoices
         * @request GET:/invoices
         * @secure
         */
        findAllInvoices: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Unique identifier assigned to the customer in your application.
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id?: string;
            /**
             * Filter invoices of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
             * @example 9000
             */
            amount_from?: number;
            /**
             * Filter invoices up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
             * @example 100000
             */
            amount_to?: number;
            /**
             * Filter invoices starting from a specific date.
             * @format date
             * @example "2022-07-08"
             */
            issuing_date_from?: string;
            /**
             * Filter invoices up to a specific date.
             * @format date
             * @example "2022-08-09"
             */
            issuing_date_to?: string;
            /** Filter invoices by statuses. Possible values are `draft`, `failed`, `finalized`, `pending` and `voided`. */
            "statuses[]"?: ("draft" | "finalized" | "failed" | "pending" | "voided")[];
            /** Filter invoices by payment statuses. Possible values are `pending`, `failed` or `succeeded`. */
            "payment_statuses[]"?: ("pending" | "failed" | "succeeded")[];
            /**
             * Filter invoices by payment_overdue. Possible values are `true` or `false`.
             * @example true
             */
            payment_overdue?: boolean;
            /**
             * Search invoices by id, number, customer name, customer external_id or customer email.
             * @example "Jane"
             */
            search_term?: string;
            /**
             * Filter invoices by currency. Possible values ISO 4217 currency codes.
             * @example "EUR"
             */
            currency?: string;
            /**
             * Filter invoices with a payment dispute lost. Possible values are `true` or `false`.
             * @example true
             */
            payment_dispute_lost?: boolean;
            /** Filter invoices by invoice type. Possible values are `subscription`, `add_on`, `credit`, `one_off`, `advance_charges` or `progressive_billing`. */
            invoice_type?: "subscription" | "add_on" | "credit" | "one_off" | "advance_charges" | "progressive_billing";
            /**
             * Filter invoices by self billed. Possible values are `true` or `false`.
             * @example true
             */
            self_billed?: boolean;
            /**
             * Filter invoices by billing entity codes. Possible values are the billing entity codes you have created.
             * @example ["acme_corp","foo_bar"]
             */
            "billing_entity_codes[]"?: string[];
            /**
             * Filter invoices by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. Providing empty value will search for invoice without given metadata key. For example, `metadata[color]=blue`.
             * @example "someValue"
             */
            "metadata[key]"?: string;
        }, params?: RequestParams) => Promise<HttpResponse<InvoicesPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint is used for updating an existing invoice.
         *
         * @tags invoices
         * @name UpdateInvoice
         * @summary Update an invoice
         * @request PUT:/invoices/{lago_id}
         * @secure
         */
        updateInvoice: (lagoId: string, data: InvoiceUpdateInput, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for retrieving a specific invoice that has been issued.
         *
         * @tags invoices
         * @name FindInvoice
         * @summary Retrieve an invoice
         * @request GET:/invoices/{lago_id}
         * @secure
         */
        findInvoice: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for downloading a specific invoice PDF document.
         *
         * @tags invoices
         * @name DownloadInvoice
         * @summary Download an invoice PDF
         * @request POST:/invoices/{lago_id}/download
         * @secure
         */
        downloadInvoice: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for finalizing a draft invoice.
         *
         * @tags invoices
         * @name FinalizeInvoice
         * @summary Finalize a draft invoice
         * @request PUT:/invoices/{lago_id}/finalize
         * @secure
         */
        finalizeInvoice: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for setting invoice's payment dispute as lost.
         *
         * @tags invoices
         * @name LoseDisputeInvoice
         * @summary Mark an invoice payment dispute as lost
         * @request POST:/invoices/{lago_id}/lose_dispute
         * @secure
         */
        loseDisputeInvoice: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotFound | ApiErrorNotAllowed>>;
        /**
         * @description This endpoint is used for refreshing a draft invoice.
         *
         * @tags invoices
         * @name RefreshInvoice
         * @summary Refresh a draft invoice
         * @request PUT:/invoices/{lago_id}/refresh
         * @secure
         */
        refreshInvoice: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for retrying to generate a failed invoice.
         *
         * @tags invoices
         * @name RetryInvoice
         * @summary Retry generation of a failed invoice
         * @request POST:/invoices/{lago_id}/retry
         * @secure
         */
        retryInvoice: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint generates a checkout link for a specific invoice.
         *
         * @tags invoices
         * @name InvoicePaymentUrl
         * @summary Generate a payment URL
         * @request POST:/invoices/{lago_id}/payment_url
         * @secure
         */
        invoicePaymentUrl: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<InvoicePaymentUrl, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for generating invoice preview.
         *
         * @tags invoices
         * @name InvoicePreview
         * @summary Create an invoice preview
         * @request POST:/invoices/preview
         * @secure
         */
        invoicePreview: (data: InvoicePreviewInput, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint resends an invoice for collection and retry a payment.
         *
         * @tags invoices
         * @name RetryPayment
         * @summary Retry an invoice payment
         * @request POST:/invoices/{lago_id}/retry_payment
         * @secure
         */
        retryPayment: (lagoId: string, data?: {
            /** Reference to a specific payment method for processing the payment. */
            payment_method?: PaymentMethodReference;
        }, params?: RequestParams) => Promise<HttpResponse<void, ApiErrorUnauthorized | ApiErrorNotFound | ApiErrorNotAllowed>>;
        /**
         * @description This endpoint is used for voiding an invoice. • When no body parameters are provided, the invoice can be voided only if it is in a `finalized` status and its payment status is NOT `succeeded`. • When `generate_credit_note` is provided (optionally with `refund_amount` and/or `credit_amount`), this validation is bypassed: the invoice is forcibly voided and a credit note is generated. If the specified refund/credit amounts do not cover the full invoice total, the remainder is issued on a second credit note that is created and immediately voided.
         *
         * @tags invoices
         * @name VoidInvoice
         * @summary Void an invoice
         * @request POST:/invoices/{lago_id}/void
         * @secure
         */
        voidInvoice: (lagoId: string, data?: InvoiceVoidInput, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    organizations: {
        /**
         * @description This endpoint is used to update your own organization's settings.
         *
         * @tags organizations
         * @name UpdateOrganization
         * @summary Update your organization
         * @request PUT:/organizations
         * @secure
         */
        updateOrganization: (data: OrganizationUpdateInput, params?: RequestParams) => Promise<HttpResponse<Organization, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
    };
    paymentReceipts: {
        /**
         * @description This endpoint is used to list all existing payment receipts.
         *
         * @tags payment_receipts
         * @name FindAllPaymentReceipts
         * @summary List all payment receipts
         * @request GET:/payment_receipts
         * @secure
         */
        findAllPaymentReceipts: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Filter payment receipts by invoice id.
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            invoice_id?: string;
        }, params?: RequestParams) => Promise<HttpResponse<PaymentReceiptsPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint retrieves a specific payment receipt.
         *
         * @tags payment_receipts
         * @name FindPaymentReceipt
         * @summary Retrieve a payment receipt
         * @request GET:/payment_receipts/{lago_id}
         * @secure
         */
        findPaymentReceipt: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<PaymentReceipt, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    paymentRequests: {
        /**
         * @description This endpoint is used to create a payment request to collect payments of overdue invoices of a given customer
         *
         * @tags payment_requests
         * @name CreatePaymentRequest
         * @summary Create a payment request
         * @request POST:/payment_requests
         * @secure
         */
        createPaymentRequest: (data: PaymentRequestCreateInput, params?: RequestParams) => Promise<HttpResponse<PaymentRequest, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
        /**
         * @description This endpoint is used to list all existing payment requests.
         *
         * @tags payment_requests
         * @name FindAllPaymentRequests
         * @summary List all payment requests
         * @request GET:/payment_requests
         * @secure
         */
        findAllPaymentRequests: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Unique identifier assigned to the customer in your application.
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id?: string;
            /**
             * Filter by payment status. Possible values are `pending`, `failed` or `succeeded`.
             * @example "pending"
             */
            payment_status?: "pending" | "failed" | "succeeded";
        }, params?: RequestParams) => Promise<HttpResponse<PaymentRequestsPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint retrieves a specific payment request by its ID.
         *
         * @tags payment_requests
         * @name FindPaymentRequest
         * @summary Retrieve a payment request
         * @request GET:/payment_requests/{lago_id}
         * @secure
         */
        findPaymentRequest: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<PaymentRequestObject, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    payments: {
        /**
         * @description This endpoint is used to create a manual payment
         *
         * @tags payments
         * @name CreatePayment
         * @summary Create a payment
         * @request POST:/payments
         * @secure
         */
        createPayment: (data: PaymentCreateInput, params?: RequestParams) => Promise<HttpResponse<Payment, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
        /**
         * @description This endpoint is used to list all payments
         *
         * @tags payments
         * @name FindAllPayments
         * @summary List all payments
         * @request GET:/payments
         * @secure
         */
        findAllPayments: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Unique identifier assigned to the customer in your application.
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id?: string;
            /**
             * Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            invoice_id?: string;
        }, params?: RequestParams) => Promise<HttpResponse<PaymentsPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint retrieves a specific payment by its ID.
         *
         * @tags payments
         * @name FindPayment
         * @summary Retrieve a payment
         * @request GET:/payments/{lago_id}
         * @secure
         */
        findPayment: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<PaymentObject, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    plans: {
        /**
         * @description This endpoint creates a plan with subscription and usage-based charges. It supports flexible billing cadence (in-advance or in-arrears) and allows for both recurring and metered charges.
         *
         * @tags plans
         * @name CreatePlan
         * @summary Create a plan
         * @request POST:/plans
         * @secure
         */
        createPlan: (data: PlanCreateInput, params?: RequestParams) => Promise<HttpResponse<Plan, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves all existing plans.
         *
         * @tags plans
         * @name FindAllPlans
         * @summary List all plans
         * @request GET:/plans
         * @secure
         */
        findAllPlans: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
        }, params?: RequestParams) => Promise<HttpResponse<PlansPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint updates a specific plan with subscription and usage-based charges. It supports flexible billing cadence (in-advance or in-arrears) and allows for both recurring and metered charges.
         *
         * @tags plans
         * @name UpdatePlan
         * @summary Update a plan
         * @request PUT:/plans/{code}
         * @secure
         */
        updatePlan: (code: string, data: PlanUpdateInput, params?: RequestParams) => Promise<HttpResponse<Plan, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves a specific plan.
         *
         * @tags plans
         * @name FindPlan
         * @summary Retrieve a plan
         * @request GET:/plans/{code}
         * @secure
         */
        findPlan: (code: string, params?: RequestParams) => Promise<HttpResponse<Plan, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint deletes a specific plan. Note that this plan could be associated with active subscriptions.
         *
         * @tags plans
         * @name DestroyPlan
         * @summary Delete a plan
         * @request DELETE:/plans/{code}
         * @secure
         */
        destroyPlan: (code: string, params?: RequestParams) => Promise<HttpResponse<Plan, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint creates new entitlements by adding features to a plan. Note that all existing entitlements will be deleted and replaced by the ones provided. To add a new entitlement without removing the existing ones, use PATCH. The feature must exist and all privileges must be valid for the feature.
         *
         * @tags entitlements
         * @name CreateEntitlement
         * @summary Create an entitlement
         * @request POST:/plans/{code}/entitlements
         * @secure
         */
        createEntitlement: (code: string, data: EntitlementUpdateInput, params?: RequestParams) => Promise<HttpResponse<PlanEntitlements, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves all entitlements for a specific plan.
         *
         * @tags entitlements
         * @name FindAllEntitlements
         * @summary List all entitlements
         * @request GET:/plans/{code}/entitlements
         * @secure
         */
        findAllEntitlements: (code: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlements, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This accepts a list of entitlements to update. If the feature isn't part of the plan yet, it's added with all the privileges from the payload. If the feature is already part of the plan, the privilege and values are updated or added. All privileges must be valid for the feature. All features  and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints.
         *
         * @tags entitlements
         * @name UpdateEntitlement
         * @summary Partial update of an entitlement
         * @request PATCH:/plans/{code}/entitlements
         * @secure
         */
        updateEntitlement: (code: string, data: EntitlementUpdateInput, params?: RequestParams) => Promise<HttpResponse<PlanEntitlements, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves a specific entitlement for a plan.
         *
         * @tags entitlements
         * @name FindEntitlement
         * @summary Retrieve an entitlement
         * @request GET:/plans/{code}/entitlements/{feature_code}
         * @secure
         */
        findEntitlement: (code: string, featureCode: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint deletes an existing entitlement by removing the feature from the plan.
         *
         * @tags entitlements
         * @name DestroyEntitlement
         * @summary Delete an entitlement
         * @request DELETE:/plans/{code}/entitlements/{feature_code}
         * @secure
         */
        destroyEntitlement: (code: string, featureCode: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint removes a specific privilege and its value from an entitlement. The privilege remains untouched on the original feature.
         *
         * @tags entitlements
         * @name RemoveEntitlementPrivilege
         * @summary Remove a privilege from an entitlement
         * @request DELETE:/plans/{code}/entitlements/{feature_code}/privileges/{privilege_code}
         * @secure
         */
        removeEntitlementPrivilege: (code: string, featureCode: string, privilegeCode: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint replaces all existing metadata on a plan with the provided key-value pairs. Any existing metadata keys not included in the request will be removed.
         *
         * @tags plans
         * @name ReplacePlanMetadata
         * @summary Replace plan metadata
         * @request POST:/plans/{code}/metadata
         * @secure
         */
        replacePlanMetadata: (code: string, data: PlanMetadataResponse, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint merges the provided metadata with existing metadata on the plan. Existing keys not in the request are preserved. New keys are added, existing keys are updated.
         *
         * @tags plans
         * @name MergePlanMetadata
         * @summary Merge plan metadata
         * @request PATCH:/plans/{code}/metadata
         * @secure
         */
        mergePlanMetadata: (code: string, data: PlanMetadataResponse, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint removes all metadata from a plan.
         *
         * @tags plans
         * @name DeleteAllPlanMetadata
         * @summary Delete all plan metadata
         * @request DELETE:/plans/{code}/metadata
         * @secure
         */
        deleteAllPlanMetadata: (code: string, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint removes a single metadata key from a plan.
         *
         * @tags plans
         * @name DeletePlanMetadataKey
         * @summary Delete a metadata key
         * @request DELETE:/plans/{code}/metadata/{key}
         * @secure
         */
        deletePlanMetadataKey: (code: string, key: string, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint creates a new charge for a specific plan.
         *
         * @tags plans
         * @name CreatePlanCharge
         * @summary Create a charge
         * @request POST:/plans/{code}/charges
         * @secure
         */
        createPlanCharge: (code: string, data: ChargeCreateInput, params?: RequestParams) => Promise<HttpResponse<Charge, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves all charges for a specific plan.
         *
         * @tags plans
         * @name FindAllPlanCharges
         * @summary List all charges for a plan
         * @request GET:/plans/{code}/charges
         * @secure
         */
        findAllPlanCharges: (code: string, query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
        }, params?: RequestParams) => Promise<HttpResponse<ChargesPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves a specific charge for a plan.
         *
         * @tags plans
         * @name FindPlanCharge
         * @summary Retrieve a charge
         * @request GET:/plans/{code}/charges/{charge_code}
         * @secure
         */
        findPlanCharge: (code: string, chargeCode: string, params?: RequestParams) => Promise<HttpResponse<Charge, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint updates a specific charge for a plan.
         *
         * @tags plans
         * @name UpdatePlanCharge
         * @summary Update a charge
         * @request PUT:/plans/{code}/charges/{charge_code}
         * @secure
         */
        updatePlanCharge: (code: string, chargeCode: string, data: ChargeUpdateInput, params?: RequestParams) => Promise<HttpResponse<Charge, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint deletes a specific charge from a plan.
         *
         * @tags plans
         * @name DestroyPlanCharge
         * @summary Delete a charge
         * @request DELETE:/plans/{code}/charges/{charge_code}
         * @secure
         */
        destroyPlanCharge: (code: string, chargeCode: string, data: ChargeDeleteInput, params?: RequestParams) => Promise<HttpResponse<Charge, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint creates a new filter for a specific charge.
         *
         * @tags plans
         * @name CreatePlanChargeFilter
         * @summary Create a charge filter
         * @request POST:/plans/{code}/charges/{charge_code}/filters
         * @secure
         */
        createPlanChargeFilter: (code: string, chargeCode: string, data: ChargeFilterCreateInput, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves all filters for a specific charge.
         *
         * @tags plans
         * @name FindAllPlanChargeFilters
         * @summary List all filters for a charge
         * @request GET:/plans/{code}/charges/{charge_code}/filters
         * @secure
         */
        findAllPlanChargeFilters: (code: string, chargeCode: string, query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
        }, params?: RequestParams) => Promise<HttpResponse<ChargeFiltersPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves a specific filter for a charge.
         *
         * @tags plans
         * @name FindPlanChargeFilter
         * @summary Retrieve a charge filter
         * @request GET:/plans/{code}/charges/{charge_code}/filters/{filter_id}
         * @secure
         */
        findPlanChargeFilter: (code: string, chargeCode: string, filterId: string, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint updates a specific filter for a charge.
         *
         * @tags plans
         * @name UpdatePlanChargeFilter
         * @summary Update a charge filter
         * @request PUT:/plans/{code}/charges/{charge_code}/filters/{filter_id}
         * @secure
         */
        updatePlanChargeFilter: (code: string, chargeCode: string, filterId: string, data: ChargeFilterUpdateInput, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint deletes a specific filter from a charge.
         *
         * @tags plans
         * @name DestroyPlanChargeFilter
         * @summary Delete a charge filter
         * @request DELETE:/plans/{code}/charges/{charge_code}/filters/{filter_id}
         * @secure
         */
        destroyPlanChargeFilter: (code: string, chargeCode: string, filterId: string, data: ChargeFilterDeleteInput, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint creates a new fixed charge for a specific plan.
         *
         * @tags plans
         * @name CreatePlanFixedCharge
         * @summary Create a fixed charge
         * @request POST:/plans/{code}/fixed_charges
         * @secure
         */
        createPlanFixedCharge: (code: string, data: FixedChargeCreateInput, params?: RequestParams) => Promise<HttpResponse<FixedCharge, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves all fixed charges for a specific plan.
         *
         * @tags plans
         * @name FindAllPlanFixedCharges
         * @summary List all fixed charges for a plan
         * @request GET:/plans/{code}/fixed_charges
         * @secure
         */
        findAllPlanFixedCharges: (code: string, query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
        }, params?: RequestParams) => Promise<HttpResponse<FixedChargesPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves a specific fixed charge for a plan.
         *
         * @tags plans
         * @name FindPlanFixedCharge
         * @summary Retrieve a fixed charge
         * @request GET:/plans/{code}/fixed_charges/{fixed_charge_code}
         * @secure
         */
        findPlanFixedCharge: (code: string, fixedChargeCode: string, params?: RequestParams) => Promise<HttpResponse<FixedCharge, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint updates a specific fixed charge for a plan.
         *
         * @tags plans
         * @name UpdatePlanFixedCharge
         * @summary Update a fixed charge
         * @request PUT:/plans/{code}/fixed_charges/{fixed_charge_code}
         * @secure
         */
        updatePlanFixedCharge: (code: string, fixedChargeCode: string, data: FixedChargeUpdateInput, params?: RequestParams) => Promise<HttpResponse<FixedCharge, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint deletes a specific fixed charge from a plan.
         *
         * @tags plans
         * @name DestroyPlanFixedCharge
         * @summary Delete a fixed charge
         * @request DELETE:/plans/{code}/fixed_charges/{fixed_charge_code}
         * @secure
         */
        destroyPlanFixedCharge: (code: string, fixedChargeCode: string, data: FixedChargeDeleteInput, params?: RequestParams) => Promise<HttpResponse<FixedCharge, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    subscriptions: {
        /**
         * @description This endpoint assigns a plan to a customer, creating or modifying a subscription. Ideal for initial subscriptions or plan changes (upgrades/downgrades).
         *
         * @tags subscriptions
         * @name CreateSubscription
         * @summary Assign a plan to a customer
         * @request POST:/subscriptions
         * @secure
         */
        createSubscription: (data: SubscriptionCreateInput, params?: RequestParams) => Promise<HttpResponse<SubscriptionExtended, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves all active subscriptions.
         *
         * @tags subscriptions
         * @name FindAllSubscriptions
         * @summary List all subscriptions
         * @request GET:/subscriptions
         * @secure
         */
        findAllSubscriptions: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * The customer external unique identifier (provided by your own application)
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id?: string;
            /**
             * The unique code representing the plan to be attached to the customer. This code must correspond to the code property of one of the active plans.
             * @example "premium"
             */
            plan_code?: string;
            /**
             * If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`.
             * @example ["active","pending"]
             */
            "status[]"?: ("active" | "canceled" | "pending" | "terminated")[];
        }, params?: RequestParams) => Promise<HttpResponse<SubscriptionsPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint retrieves a specific subscription.
         *
         * @tags subscriptions
         * @name FindSubscription
         * @summary Retrieve a subscription
         * @request GET:/subscriptions/{external_id}
         * @secure
         */
        findSubscription: (externalId: string, query?: {
            /**
             * By default, this endpoint only return `active` subscriptions. If you want to retrieve a subscription with a different `status`, you can specify it here.
             *
             * _Note: As there may exists multiple `canceled` or `terminated` subscribtions for the same `external_id`, it is recommended to use the "List all subscriptions" endpoint to retrieve those subscriptions._
             * @default "active"
             * @example "active"
             */
            status?: "active" | "terminated" | "pending" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<SubscriptionExtended, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint allows you to update a subscription.
         *
         * @tags subscriptions
         * @name UpdateSubscription
         * @summary Update a subscription
         * @request PUT:/subscriptions/{external_id}
         * @secure
         */
        updateSubscription: (externalId: string, data: SubscriptionUpdateInput, query?: {
            /**
             * By default, this endpoint only return `active` subscriptions. If you want to update a subscription with a different `status`, you can specify it here.
             * @default "active"
             * @example "active"
             */
            status?: "active" | "pending";
        }, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint allows you to terminate a subscription.
         *
         * @tags subscriptions
         * @name DestroySubscription
         * @summary Terminate a subscription
         * @request DELETE:/subscriptions/{external_id}
         * @secure
         */
        destroySubscription: (externalId: string, query?: {
            /**
             * If the field is not defined, Lago will terminate only `active` subscriptions. However, if you wish to cancel a `pending` subscription, please ensure that you include `status=pending` in your request.
             * @example "pending"
             */
            status?: string;
            /**
             * When a pay-in-advance subscription is terminated before the end of its billing period, we generate a credit note for the unused subscription time by default.
             * This field allows you to control the behavior of the credit note generation:
             *
             * - `credit`: A credit note is generated for the unused subscription time. The unused amount is credited back to the customer.
             * - `refund`: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer.
             * - `skip`: No credit note is generated for the unused subscription time.
             *
             * _Note: This field is only applicable to pay-in-advance plans and is ignored for pay-in-arrears plans._
             * @example "credit"
             */
            on_termination_credit_note?: "credit" | "refund" | "skip";
            /**
             * When a subscription is terminated before the end of its billing period, we generate an invoice for the unbilled usage.
             * This field allows you to control the behavior of the invoice generation:
             *
             * - `generate`: An invoice is generated for the unbilled usage.
             * - `skip`: No invoice is generated for the unbilled usage.
             * @example "generate"
             */
            on_termination_invoice?: "generate" | "skip";
        }, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint enables the retrieval of the lifetime usage of a subscription.
         *
         * @tags subscriptions
         * @name GetSubscriptionLifetimeUsage
         * @summary Retrieve subscription lifetime usage
         * @request GET:/subscriptions/{external_id}/lifetime_usage
         * @secure
         */
        getSubscriptionLifetimeUsage: (externalId: string, params?: RequestParams) => Promise<HttpResponse<LifetimeUsage, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint allows you to update the lifetime usage of a subscription.
         *
         * @tags subscriptions
         * @name UpdateSubscriptionLifetimeUsage
         * @summary Update a subscription lifetime usage
         * @request PUT:/subscriptions/{external_id}/lifetime_usage
         * @secure
         */
        updateSubscriptionLifetimeUsage: (externalId: string, data: LifetimeUsageInput, params?: RequestParams) => Promise<HttpResponse<LifetimeUsage, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint enables the retrieval of all alerts for a subscription.
         *
         * @tags subscriptions
         * @name GetSubscriptionAlerts
         * @summary List subscription alerts
         * @request GET:/subscriptions/{external_id}/alerts
         * @secure
         */
        getSubscriptionAlerts: (externalId: string, query?: {
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<Alerts, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint allows you to create alerts for a subscription. Send a single alert object wrapped in `alert` key to create one alert, or an array of alert objects wrapped in `alerts` key to create multiple alerts atomically.
         *
         * @tags subscriptions
         * @name CreateSubscriptionAlert
         * @summary Create subscription alert(s)
         * @request POST:/subscriptions/{external_id}/alerts
         * @secure
         */
        createSubscriptionAlert: (externalId: string, data: AlertCreateInput | AlertBatchCreateInput, query?: {
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<Alerts | Alert, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint allows you to delete all alerts for a subscription.
         *
         * @tags subscriptions
         * @name DeleteAllSubscriptionAlerts
         * @summary Delete all subscription alerts
         * @request DELETE:/subscriptions/{external_id}/alerts
         * @secure
         */
        deleteAllSubscriptionAlerts: (externalId: string, query?: {
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<void, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint enables the retrieval of a specific alert for a subscription.
         *
         * @tags subscriptions
         * @name GetSubscriptionAlert
         * @summary Retrieve a subscription alert
         * @request GET:/subscriptions/{external_id}/alerts/{code}
         * @secure
         */
        getSubscriptionAlert: (externalId: string, code: string, query?: {
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<Alert, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint allows you to update an existing alert for a subscription.
         *
         * @tags subscriptions
         * @name UpdateSubscriptionAlert
         * @summary Update a subscription alert
         * @request PUT:/subscriptions/{external_id}/alerts/{code}
         * @secure
         */
        updateSubscriptionAlert: (externalId: string, code: string, data: AlertUpdateInput, query?: {
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<Alert, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint allows you to delete an existing alert for a subscription.
         *
         * @tags subscriptions
         * @name DeleteSubscriptionAlert
         * @summary Delete a subscription alert
         * @request DELETE:/subscriptions/{external_id}/alerts/{code}
         * @secure
         */
        deleteSubscriptionAlert: (externalId: string, code: string, query?: {
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<Alert, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves all entitlements for a specific subscription, including both plan entitlements and any subscription-specific overrides.
         *
         * @tags entitlements
         * @name FindAllSubscriptionEntitlements
         * @summary List all subscription entitlements
         * @request GET:/subscriptions/{external_id}/entitlements
         * @secure
         */
        findAllSubscriptionEntitlements: (externalId: string, query?: {
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlements, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This accepts a list of entitlements to update. If the feature isn't part of the subscription yet, it's added with all the privileges from the payload. If the feature is already part of the subscription (via plan or via override), the privilege and values are updated or added. All privileges must be valid for the feature. All features  and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints.
         *
         * @tags entitlements
         * @name UpdateSubscriptionEntitlements
         * @summary Update subscription entitlements
         * @request PATCH:/subscriptions/{external_id}/entitlements
         * @secure
         */
        updateSubscriptionEntitlements: (externalId: string, data: EntitlementUpdateInput, query?: {
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlements, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint removes a specific feature entitlement from a subscription. The entitlement remains available from the plan.
         *
         * @tags entitlements
         * @name DestroySubscriptionEntitlement
         * @summary Remove an entitlement from a subscription
         * @request DELETE:/subscriptions/{external_id}/entitlements/{feature_code}
         * @secure
         */
        destroySubscriptionEntitlement: (externalId: string, featureCode: string, query?: {
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint removes a specific privilege from a subscription entitlement. The privilege entitlement remains available from the plan.
         *
         * @tags entitlements
         * @name DestroySubscriptionEntitlementPrivilege
         * @summary Remove a privilege from a subscription entitlement override
         * @request DELETE:/subscriptions/{external_id}/entitlements/{feature_code}/privileges/{privilege_code}
         * @secure
         */
        destroySubscriptionEntitlementPrivilege: (externalId: string, featureCode: string, privilegeCode: string, query?: {
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlement, ApiErrorUnauthorized | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves all effective fixed charges for a specific subscription. If the subscription has plan overrides with fixed charge overrides, the overridden fixed charges are returned.
         *
         * @tags subscriptions
         * @name FindAllSubscriptionFixedCharges
         * @summary List all fixed charges for a subscription
         * @request GET:/subscriptions/{external_id}/fixed_charges
         * @secure
         */
        findAllSubscriptionFixedCharges: (externalId: string, query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<FixedChargesPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves all effective charges for a specific subscription. If the subscription has plan overrides with charge overrides, the overridden charges are returned.
         *
         * @tags subscriptions
         * @name FindAllSubscriptionCharges
         * @summary List all charges for a subscription
         * @request GET:/subscriptions/{external_id}/charges
         * @secure
         */
        findAllSubscriptionCharges: (externalId: string, query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<ChargesPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves a specific effective charge for a subscription. If the subscription has a plan override with a charge override, the overridden charge is returned.
         *
         * @tags subscriptions
         * @name FindSubscriptionCharge
         * @summary Retrieve a charge for a subscription
         * @request GET:/subscriptions/{external_id}/charges/{charge_code}
         * @secure
         */
        findSubscriptionCharge: (externalId: string, chargeCode: string, query?: {
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<Charge, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint creates or updates a charge override for a specific subscription. If the subscription does not have a plan override yet, one will be created automatically. The charge override allows customizing specific charge properties (invoice_display_name, min_amount_cents, properties, filters, taxes, applied_pricing_unit) without affecting the original plan charge. This is a premium feature.
         *
         * @tags subscriptions
         * @name OverrideSubscriptionCharge
         * @summary Override a charge for a subscription
         * @request PUT:/subscriptions/{external_id}/charges/{charge_code}
         * @secure
         */
        overrideSubscriptionCharge: (externalId: string, chargeCode: string, data: SubscriptionChargeOverride, query?: {
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<Charge, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
        /**
         * @description This endpoint creates a new filter for a specific charge on a subscription.
         *
         * @tags subscriptions
         * @name CreateSubscriptionChargeFilter
         * @summary Create a charge filter
         * @request POST:/subscriptions/{external_id}/charges/{charge_code}/filters
         * @secure
         */
        createSubscriptionChargeFilter: (externalId: string, chargeCode: string, data: ChargeFilterCreateInput, query?: {
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves all filters for a specific charge on a subscription.
         *
         * @tags subscriptions
         * @name FindAllSubscriptionChargeFilters
         * @summary List all filters for a charge
         * @request GET:/subscriptions/{external_id}/charges/{charge_code}/filters
         * @secure
         */
        findAllSubscriptionChargeFilters: (externalId: string, chargeCode: string, query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<ChargeFiltersPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves a specific filter for a charge on a subscription.
         *
         * @tags subscriptions
         * @name FindSubscriptionChargeFilter
         * @summary Retrieve a charge filter
         * @request GET:/subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}
         * @secure
         */
        findSubscriptionChargeFilter: (externalId: string, chargeCode: string, filterId: string, query?: {
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint updates a specific filter for a charge on a subscription.
         *
         * @tags subscriptions
         * @name UpdateSubscriptionChargeFilter
         * @summary Update a charge filter
         * @request PUT:/subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}
         * @secure
         */
        updateSubscriptionChargeFilter: (externalId: string, chargeCode: string, filterId: string, data: ChargeFilterUpdateInput, query?: {
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint deletes a specific filter from a charge on a subscription.
         *
         * @tags subscriptions
         * @name DestroySubscriptionChargeFilter
         * @summary Delete a charge filter
         * @request DELETE:/subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}
         * @secure
         */
        destroySubscriptionChargeFilter: (externalId: string, chargeCode: string, filterId: string, query?: {
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves a specific effective fixed charge for a subscription. If the subscription has a plan override with a fixed charge override, the overridden fixed charge is returned.
         *
         * @tags subscriptions
         * @name FindSubscriptionFixedCharge
         * @summary Retrieve a fixed charge for a subscription
         * @request GET:/subscriptions/{external_id}/fixed_charges/{fixed_charge_code}
         * @secure
         */
        findSubscriptionFixedCharge: (externalId: string, fixedChargeCode: string, query?: {
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<FixedCharge, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint creates or updates a fixed charge override for a specific subscription. If the subscription does not have a plan override yet, one will be created automatically. The fixed charge override allows customizing specific fixed charge properties (invoice_display_name, units, properties, taxes) without affecting the original plan fixed charge. This is a premium feature.
         *
         * @tags subscriptions
         * @name OverrideSubscriptionFixedCharge
         * @summary Override a fixed charge for a subscription
         * @request PUT:/subscriptions/{external_id}/fixed_charges/{fixed_charge_code}
         * @secure
         */
        overrideSubscriptionFixedCharge: (externalId: string, fixedChargeCode: string, data: SubscriptionFixedChargeOverride, query?: {
            /**
             * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
             * @default "active"
             * @example "active"
             */
            subscription_status?: "pending" | "active" | "terminated" | "canceled";
        }, params?: RequestParams) => Promise<HttpResponse<FixedCharge, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
    };
    taxes: {
        /**
         * @description This endpoint creates a new tax representing a customizable tax rate applicable to either the organization or a specific customer.
         *
         * @tags taxes
         * @name CreateTax
         * @summary Create a tax
         * @request POST:/taxes
         * @secure
         */
        createTax: (data: TaxCreateInput, params?: RequestParams) => Promise<HttpResponse<Tax, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
        /**
         * @description This endpoint retrieves all existing taxes representing a customizable tax rate applicable to either the organization or a specific customer.
         *
         * @tags taxes
         * @name FindAllTaxes
         * @summary List all taxes
         * @request GET:/taxes
         * @secure
         */
        findAllTaxes: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
        }, params?: RequestParams) => Promise<HttpResponse<TaxesPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint updates an existing tax representing a customizable tax rate applicable to either the organization or a specific customer.
         *
         * @tags taxes
         * @name UpdateTax
         * @summary Update a tax
         * @request PUT:/taxes/{code}
         * @secure
         */
        updateTax: (code: string, data: TaxUpdateInput, params?: RequestParams) => Promise<HttpResponse<Tax, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves an existing tax representing a customizable tax rate applicable to either the organization or a specific customer. The tax is identified by its unique code.
         *
         * @tags taxes
         * @name FindTax
         * @summary Retrieve a Tax
         * @request GET:/taxes/{code}
         * @secure
         */
        findTax: (code: string, params?: RequestParams) => Promise<HttpResponse<Tax, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to delete a tax.
         *
         * @tags taxes
         * @name DestroyTax
         * @summary Delete a tax
         * @request DELETE:/taxes/{code}
         * @secure
         */
        destroyTax: (code: string, params?: RequestParams) => Promise<HttpResponse<Tax, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    wallets: {
        /**
         * @description This endpoint is used to create a wallet with prepaid credits.
         *
         * @tags wallets
         * @name CreateWallet
         * @summary Create a wallet
         * @request POST:/wallets
         * @secure
         */
        createWallet: (data: WalletCreateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
        /**
         * @description This endpoint is used to list all wallets with prepaid credits.
         *
         * @tags wallets
         * @name FindAllWallets
         * @summary List all wallets
         * @request GET:/wallets
         * @secure
         */
        findAllWallets: (query: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * The customer external unique identifier (provided by your own application).
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id: string;
        }, params?: RequestParams) => Promise<HttpResponse<WalletsPaginated, ApiErrorUnauthorized | ApiErrorForbidden>>;
        /**
         * @description This endpoint is used to update an existing wallet with prepaid credits.
         *
         * @tags wallets
         * @name UpdateWallet
         * @summary Update a wallet
         * @request PUT:/wallets/{lago_id}
         * @secure
         */
        updateWallet: (lagoId: string, data: WalletUpdateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to retrieve an existing wallet with prepaid credits.
         *
         * @tags wallets
         * @name FindWallet
         * @summary Retrieve a wallet
         * @request GET:/wallets/{lago_id}
         * @secure
         */
        findWallet: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to terminate an existing wallet with prepaid credits.
         *
         * @tags wallets
         * @name DestroyWallet
         * @summary Terminate a wallet
         * @request DELETE:/wallets/{lago_id}
         * @secure
         */
        destroyWallet: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden | ApiErrorNotFound>>;
        /**
         * @description This endpoint replaces all existing metadata on a wallet with the provided key-value pairs. Any existing metadata keys not included in the request will be removed.
         *
         * @tags wallets
         * @name ReplaceWalletMetadata
         * @summary Replace wallet metadata
         * @request POST:/wallets/{lago_id}/metadata
         * @secure
         */
        replaceWalletMetadata: (lagoId: string, data: WalletMetadataResponse, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint merges the provided metadata with existing metadata on the wallet. Existing keys not in the request are preserved. New keys are added, existing keys are updated.
         *
         * @tags wallets
         * @name MergeWalletMetadata
         * @summary Merge wallet metadata
         * @request PATCH:/wallets/{lago_id}/metadata
         * @secure
         */
        mergeWalletMetadata: (lagoId: string, data: WalletMetadataResponse, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint removes all metadata from a wallet.
         *
         * @tags wallets
         * @name DeleteAllWalletMetadata
         * @summary Delete all wallet metadata
         * @request DELETE:/wallets/{lago_id}/metadata
         * @secure
         */
        deleteAllWalletMetadata: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint removes a single metadata key from a wallet.
         *
         * @tags wallets
         * @name DeleteWalletMetadataKey
         * @summary Delete a metadata key
         * @request DELETE:/wallets/{lago_id}/metadata/{key}
         * @secure
         */
        deleteWalletMetadataKey: (lagoId: string, key: string, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to list all wallet transactions.
         *
         * @tags wallets
         * @name FindAllWalletTransactions
         * @summary List all wallet transactions
         * @request GET:/wallets/{lago_id}/wallet_transactions
         * @secure
         */
        findAllWalletTransactions: (lagoId: string, query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * The status of the wallet transaction. Possible values are `pending` or `settled`.
             * @example "pending"
             */
            status?: string;
            /**
             * The transaction status of the wallet transaction. Possible values are `purchased` (with pending or settled status), `granted` (without invoice_id), `voided` or `invoiced`.
             * @example "purchased"
             */
            transaction_status?: string;
            /**
             * The transaction type of the wallet transaction. Possible values are `inbound` (increasing the wallet balance) or `outbound` (decreasing the wallet balance).
             * @example "inbound"
             */
            transaction_type?: string;
        }, params?: RequestParams) => Promise<HttpResponse<WalletTransactionsPaginated, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
    };
    walletTransactions: {
        /**
         * @description This endpoint is used to top-up an active wallet.
         *
         * @tags wallets
         * @name CreateWalletTransaction
         * @summary Top up a wallet
         * @request POST:/wallet_transactions
         * @secure
         */
        createWalletTransaction: (data: WalletTransactionCreateInput, params?: RequestParams) => Promise<HttpResponse<WalletTransactions, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
        /**
         * @description This endpoint is used to retrieve a specific wallet transactions.
         *
         * @tags wallets
         * @name FindWalletTransaction
         * @summary Retrieve a wallet transaction
         * @request GET:/wallet_transactions/{lago_id}
         * @secure
         */
        findWalletTransaction: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WalletTransactionObject, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
        /**
         * @description This endpoint generates a checkout link for a specific wallet transaction.
         *
         * @tags wallets
         * @name WalletTransactionPaymentUrl
         * @summary Generate a payment URL
         * @request POST:/wallet_transactions/{lago_id}/payment_url
         * @secure
         */
        walletTransactionPaymentUrl: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WalletTransactionPaymentUrl, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to list all consumption records for an inbound wallet transaction. It shows how the credits from this inbound transaction were consumed by outbound transactions. Only available for traceable wallets.
         *
         * @tags wallets
         * @name FindAllWalletTransactionConsumptions
         * @summary List all consumptions for a wallet transaction
         * @request GET:/wallet_transactions/{lago_id}/consumptions
         * @secure
         */
        findAllWalletTransactionConsumptions: (lagoId: string, query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
        }, params?: RequestParams) => Promise<HttpResponse<WalletTransactionConsumptionsPaginated, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to list all funding records for an outbound wallet transaction. It shows which inbound transactions funded this outbound transaction. Only available for traceable wallets.
         *
         * @tags wallets
         * @name FindAllWalletTransactionFundings
         * @summary List all fundings for a wallet transaction
         * @request GET:/wallet_transactions/{lago_id}/fundings
         * @secure
         */
        findAllWalletTransactionFundings: (lagoId: string, query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
        }, params?: RequestParams) => Promise<HttpResponse<WalletTransactionFundingsPaginated, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden | ApiErrorNotFound>>;
    };
    webhooks: {
        /**
         * @description This endpoint is used to retrieve the public key used to verify the webhooks signature
         *
         * @tags webhooks
         * @name FetchPublicKey
         * @summary Retrieve webhook public key
         * @request GET:/webhooks/public_key
         * @secure
         */
        fetchPublicKey: (params?: RequestParams) => Promise<HttpResponse<string, ApiErrorUnauthorized>>;
    };
    webhookEndpoints: {
        /**
         * @description This endpoint is used to create a webhook endpoint.
         *
         * @tags webhook_endpoints
         * @name CreateWebhookEndpoint
         * @summary Create a webhook_endpoint
         * @request POST:/webhook_endpoints
         * @secure
         */
        createWebhookEndpoint: (data: WebhookEndpointCreateInput, params?: RequestParams) => Promise<HttpResponse<WebhookEndpoint, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
        /**
         * @description This endpoint is used to list all webhook endpoints.
         *
         * @tags webhook_endpoints
         * @name FindAllWebhookEndpoints
         * @summary List all webhook endpoints
         * @request GET:/webhook_endpoints
         * @secure
         */
        findAllWebhookEndpoints: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
        }, params?: RequestParams) => Promise<HttpResponse<WebhookEndpointsPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint is used to update an existing webhook endpoint.
         *
         * @tags webhook_endpoints
         * @name UpdateWebhookEndpoint
         * @summary Update a webhook endpoint
         * @request PUT:/webhook_endpoints/{lago_id}
         * @secure
         */
        updateWebhookEndpoint: (lagoId: string, data: WebhookEndpointUpdateInput, params?: RequestParams) => Promise<HttpResponse<WebhookEndpoint, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to retrieve an existing webhook endpoint.
         *
         * @tags webhook_endpoints
         * @name FindWebhookEndpoint
         * @summary Retrieve a webhook endpoint
         * @request GET:/webhook_endpoints/{lago_id}
         * @secure
         */
        findWebhookEndpoint: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WebhookEndpoint, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to delete an existing webhook endpoint.
         *
         * @tags webhook_endpoints
         * @name DestroyWebhookEndpoint
         * @summary Delete a webhook endpoint
         * @request DELETE:/webhook_endpoints/{lago_id}
         * @secure
         */
        destroyWebhookEndpoint: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WebhookEndpoint, ApiErrorUnauthorized | ApiErrorNotFound | ApiErrorNotAllowed>>;
    };
}
export {};
