import { Environment } from '@abacus/common';

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */
/**
 * Abacus event ID
 * @minimum 0
 */
type AbacusEventId = number;

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */
/**
 * A datetime string formatted as YYYY-MM-DDTHH:MM:SS.fz
 */
type DateTime = string;

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */
/**
 * Abacus event name, snake-cased
 */
type AbacusEventName = (typeof AbacusEventName)[keyof typeof AbacusEventName];
declare const AbacusEventName: {
    readonly approve_sales_files: "approve_sales_files";
    readonly accounting_period_close: "accounting_period_close";
    readonly accounting_period_mechanicals: "accounting_period_mechanicals";
    readonly accounting_run_calculate: "accounting_run_calculate";
    readonly accounting_run_calculate_nr: "accounting_run_calculate_nr";
    readonly accounting_run_commit: "accounting_run_commit";
    readonly adjustment_file_upload: "adjustment_file_upload";
    readonly adjustment_file_worksheet_import: "adjustment_file_worksheet_import";
    readonly apply_pending_adjustments: "apply_pending_adjustments";
    readonly apply_royalty_correction: "apply_royalty_correction";
    readonly apply_royalty_reversal: "apply_royalty_reversal";
    readonly backfill: "backfill";
    readonly calculate_payments: "calculate_payments";
    readonly close_balance: "close_balance";
    readonly collaborators_auto_report_run: "collaborators_auto_report_run";
    readonly commit_advance_payment: "commit_advance_payment";
    readonly commit_batch_payment: "commit_batch_payment";
    readonly commit_mechanicals: "commit_mechanicals";
    readonly commit_reversal_to_subledger: "commit_reversal_to_subledger";
    readonly commit_royalties: "commit_royalties";
    readonly commit_to_subledger: "commit_to_subledger";
    readonly commit_vat: "commit_vat";
    readonly commit_vat_summary: "commit_vat_summary";
    readonly commit_withholding_tax: "commit_withholding_tax";
    readonly confirm_advance_approval: "confirm_advance_approval";
    readonly confirm_advance_payment: "confirm_advance_payment";
    readonly confirm_approval: "confirm_approval";
    readonly confirm_funds: "confirm_funds";
    readonly generate_export: "generate_export";
    readonly ingest_vat_summary: "ingest_vat_summary";
    readonly legacy_sync_contract: "legacy_sync_contract";
    readonly payment_accepted: "payment_accepted";
    readonly payment_approval: "payment_approval";
    readonly payments_generate: "payments_generate";
    readonly payment_returned: "payment_returned";
    readonly release_reserves: "release_reserves";
    readonly return_advance_payment: "return_advance_payment";
    readonly return_batch_payment: "return_batch_payment";
    readonly return_vat_summary: "return_vat_summary";
    readonly return_withholding_tax: "return_withholding_tax";
    readonly approve_sales: "approve_sales";
    readonly get_eligible_sales: "get_eligible_sales";
    readonly ingest_sales_distro: "ingest_sales_distro";
    readonly ingest_sales_nr: "ingest_sales_nr";
    readonly sap_sync_contract: "sap_sync_contract";
    readonly schedule_reserves: "schedule_reserves";
    readonly send_payments: "send_payments";
    readonly stage_royalty_correction: "stage_royalty_correction";
    readonly stage_royalty_reversal: "stage_royalty_reversal";
    readonly statement_period_close: "statement_period_close";
    readonly take_reserves: "take_reserves";
    readonly tax_withholding: "tax_withholding";
    readonly upload_approval: "upload_approval";
};

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */
/**
 * Statement period id
 * @minimum 0
 */
type StatementPeriodId = number;

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */
/**
 * Target id
 * @minimum 0
 */
type TargetId = number;

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */
/**
 * Name of the foreign table the target_id is associated with.
 */
type TargetType = (typeof TargetType)[keyof typeof TargetType];
declare const TargetType: {
    readonly accounting_period: "accounting_period";
    readonly contract: "contract";
    readonly statement_period_adjustment_file: "statement_period_adjustment_file";
    readonly worksheet_payment_contract_advance: "worksheet_payment_contract_advance";
};

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */

interface PartialAbacusEvent {
    abacus_event_id?: AbacusEventId;
    created_by?: string;
    event_date?: DateTime;
    event_name?: AbacusEventName;
    previous_abacus_event_id?: AbacusEventId;
    rolled_back_at?: DateTime;
    statement_period_id?: StatementPeriodId;
    target_id?: TargetId;
    target_type?: TargetType;
}

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */

type AbacusEvent = PartialAbacusEvent & Required<Pick<PartialAbacusEvent, "abacus_event_id" | "created_by" | "event_date" | "event_name" | "statement_period_id" | "target_id" | "target_type">>;

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */

/**
 * A JSON array containing AbacusEvents
 */
type AbacusEventsResponse = AbacusEvent[];

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */
/**
 * Correlation ID
 */
type CorrelationIdParameter = string;

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */

type CreateAbacusEventBody = {
    event_date?: DateTime;
    event_name: AbacusEventName;
    statement_period_id?: StatementPeriodId;
    target_id: TargetId;
    target_type: TargetType;
};

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */

type CreateAbacusEventHeaders = {
    /**
     * Correlation ID
     */
    "Correlation-Id"?: CorrelationIdParameter;
};

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */

type DataloadAbacusEventsHeaders = {
    /**
     * Correlation ID
     */
    "Correlation-Id"?: CorrelationIdParameter;
};

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */

/**
 * {data: AbacusEvent }
 */
type DataloadAbacusEventsResponseItemsItem = {
    data: AbacusEvent;
};

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */

/**
 * { items: [ {data: AbacusEvent } ] }
 */
type DataloadAbacusEventsResponse = {
    /** [ {data: AbacusEvent } ] */
    items: DataloadAbacusEventsResponseItemsItem[];
};

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */

type GetAbacusEventHeaders = {
    /**
     * Correlation ID
     */
    "Correlation-Id"?: CorrelationIdParameter;
};

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */
type GetAbacusEventPathParameters = {
    abacusEventId: number;
};

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */

/**
 * A JSON array containing AbacusEvent IDs
 */
type GetAbacusEventsBody = AbacusEventId[];

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */

type GetAbacusEventsByTargetHeaders = {
    /**
     * Correlation ID
     */
    "Correlation-Id"?: CorrelationIdParameter;
};

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */
type GetAbacusEventsByTargetPathParameters = {
    targetType: "accounting_period" | "contract" | "statement_period_adjustment_file" | "worksheet_payment_contract_advance";
    targetId: number;
};

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */

type GetHealthHeaders = {
    /**
     * Correlation ID
     */
    "Correlation-Id"?: CorrelationIdParameter;
};

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */

type GetPaymentGroupPaymentApprovalCountHeaders = {
    /**
     * Correlation ID
     */
    "Correlation-Id"?: CorrelationIdParameter;
};

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */
type GetPaymentGroupPaymentApprovalCountPathParameters = {
    paymentGroupPaymentId: number;
};

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */
type HealthStatus = (typeof HealthStatus)[keyof typeof HealthStatus];
declare const HealthStatus: {
    readonly ok: "ok";
};

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */

interface Health {
    status: HealthStatus;
}

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */
/**
 * PaymentGroupPayment ID
 * @minimum 0
 */
type PaymentGroupPaymentId = number;

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */

interface PaymentGroupPaymentApprovalCount {
    /**
     * Number of approval events
     * @minimum 0
     */
    approval_count: number;
    payment_group_payment_id: PaymentGroupPaymentId;
}

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */

type RollbackAbacusEventBody = {
    event_name: AbacusEventName;
    target_id: TargetId;
    target_type: TargetType;
};

/**
 * Generated by orval v7.10.0 🍺
 * Do not edit manually.
 * ows-abacus-event
 * OpenAPI spec version: 1.0.0
 */

type RollbackAbacusEventHeaders = {
    /**
     * Correlation ID
     */
    "Correlation-Id"?: CorrelationIdParameter;
};

interface ApiResponse<T> {
    data: T;
    headers?: Record<string, string>;
    status: number;
}
declare const baseUrls: Partial<Record<Environment, string>>;

export { type ApiResponse as A, type CreateAbacusEventBody as C, type DataloadAbacusEventsHeaders as D, type GetAbacusEventPathParameters as G, type Health as H, type PaymentGroupPaymentApprovalCount as P, type RollbackAbacusEventBody as R, type StatementPeriodId as S, type TargetId as T, type CreateAbacusEventHeaders as a, type AbacusEvent as b, type GetAbacusEventHeaders as c, type GetAbacusEventsByTargetPathParameters as d, type GetAbacusEventsByTargetHeaders as e, type AbacusEventsResponse as f, type GetAbacusEventsBody as g, type DataloadAbacusEventsResponse as h, type GetPaymentGroupPaymentApprovalCountPathParameters as i, type GetPaymentGroupPaymentApprovalCountHeaders as j, type RollbackAbacusEventHeaders as k, type GetHealthHeaders as l, type AbacusEventId as m, AbacusEventName as n, type CorrelationIdParameter as o, type DataloadAbacusEventsResponseItemsItem as p, type DateTime as q, HealthStatus as r, type PartialAbacusEvent as s, type PaymentGroupPaymentId as t, TargetType as u, baseUrls as v };
