/** * MPC (Mutuo, Préstamos y Créditos) Alerts Resource * * Extends MexAlertsResource with MPC-specific behavior: * - Accepts flattened CreateMPCAlertInput (MPC fields at root level) * - Returns MexMPCAlert models */ import type { AlertItemFilter, AlertItemSort, AlertSort, AtomicBatchResult, CreateAlertInput, CreateAlertItemInput, CreateMPCAlertInput, CreateMPCAlertItemInput, GenerateResult, ListOptions, MPCAlertFilter, MPCAlertItemFilter, MPCAlertSort, MpcAlertDefaultsInput, PaginatedResponse, PartialBatchResult, UpdateAlertInput, UpdateAlertItemInput, UpdateMPCAlertInput, UpdateMPCAlertItemInput, UpsertMPCAlertInput, UpsertResult, ValidationResult } from "@artu-ai/shared"; import { ReportType } from "@artu-ai/shared"; import { type AlertClientItemData, type AlertData, type AlertItemData, type AlertTransactionItemData, MexMPCAlert, MexMPCAlertClientItem, MexMPCAlertItem, MexMPCAlertTransactionItem } from "../../../../models"; import { AlertItemsResource } from "../../../alert-items"; import { AVAlertsResource } from "../alerts"; /** * MPC (Mutuo, Préstamos y Créditos) scoped alerts resource. * * @example * ```typescript * const mpcSdk = new ComplianceSDK({ * apiKey, * scope: "MX:AV:MPC", * }); * * const alert = await mpcSdk.alerts.create({ * mesReportado: "202401", * }); * * // Returns MexMPCAlert * console.log(alert.mesReportado); * ``` */ export declare class MPCAlertsResource extends AVAlertsResource { create(data: CreateMPCAlertInput): Promise; retrieve(id: string, opts?: { crossScope?: boolean; }): Promise; retrieveByMetadata(key: string, value: string, opts?: { crossScope?: boolean; }): Promise; retrieveByExternalId(externalId: string, opts?: { crossScope?: boolean; }): Promise; update(id: string, data: UpdateMPCAlertInput): Promise; list(options?: ListOptions & { crossScope?: boolean; }): Promise>; iterate(options?: { filter?: MPCAlertFilter; sort?: MPCAlertSort; pageSize?: number; crossScope?: boolean; }): AsyncGenerator; count(filter?: MPCAlertFilter, options?: { crossScope?: boolean; }): Promise; createMany(alerts: CreateMPCAlertInput[], options?: { atomic?: true; }): Promise>; createMany(alerts: CreateMPCAlertInput[], options: { atomic: false; }): Promise>; updateMany(updates: { id: string; data: UpdateMPCAlertInput; }[], options?: { atomic?: true; }): Promise>; updateMany(updates: { id: string; data: UpdateMPCAlertInput; }[], options: { atomic: false; }): Promise>; upsertByExternalId(data: UpsertMPCAlertInput): Promise>; upsertManyByExternalId(alerts: UpsertMPCAlertInput[], options?: { atomic?: true; }): Promise>>; upsertManyByExternalId(alerts: UpsertMPCAlertInput[], options: { atomic: false; }): Promise>>; addItem(alertId: string, data: CreateMPCAlertItemInput): Promise; getItem(alertId: string, itemId: string): Promise; updateItem(alertId: string, itemId: string, data: UpdateMPCAlertItemInput): Promise; listItems(alertId: string, options?: ListOptions): Promise>; protected applyScopeToItemFilter(filter?: MPCAlertItemFilter): AlertItemFilter | undefined; addItems(alertId: string, items: CreateMPCAlertItemInput[]): Promise<{ added: number; items: MexMPCAlertItem[]; }>; protected createItemsResource(): AlertItemsResource | undefined; } | undefined; alertType?: "100" | "9999" | "2801" | "2802" | "2803" | "2804" | "2805" | "2806" | "2807" | "2808" | "2809" | "2810" | "2811" | "2812" | "2813" | "2814" | { eq?: "100" | "9999" | "2801" | "2802" | "2803" | "2804" | "2805" | "2806" | "2807" | "2808" | "2809" | "2810" | "2811" | "2812" | "2813" | "2814" | undefined; in?: ("100" | "9999" | "2801" | "2802" | "2803" | "2804" | "2805" | "2806" | "2807" | "2808" | "2809" | "2810" | "2811" | "2812" | "2813" | "2814")[] | undefined; nin?: ("100" | "9999" | "2801" | "2802" | "2803" | "2804" | "2805" | "2806" | "2807" | "2808" | "2809" | "2810" | "2811" | "2812" | "2813" | "2814")[] | undefined; } | undefined; alertDescription?: string | { eq?: string | undefined; contains?: string | undefined; startsWith?: string | undefined; endsWith?: string | undefined; in?: string[] | undefined; nin?: string[] | undefined; } | undefined; }>; /** * Validates an MPC alert. * * @param alertId - The alert ID to validate * @param defaults - MPC alert defaults including rfc, alertType, etc. */ validateReport(alertId: string, defaults?: MpcAlertDefaultsInput): Promise; /** * Generates XML for an MPC alert. * * @param alertId - The alert ID to generate XML for * @param defaults - MPC alert defaults including rfc, alertType, etc. */ generateReport(alertId: string, defaults?: MpcAlertDefaultsInput): Promise; protected transformToNested(data: CreateMPCAlertInput): CreateAlertInput; protected transformUpdateToNested(data: UpdateMPCAlertInput): UpdateAlertInput; protected instantiate(data: AlertData): MexMPCAlert; /** Materializes a raw payload into a {@link MexMPCAlert} (return type narrowed via the `instantiate` override). */ materialize(data: AlertData): MexMPCAlert; protected instantiateItem(data: AlertItemData): MexMPCAlertItem; protected instantiateTransactionItem(data: AlertTransactionItemData): MexMPCAlertTransactionItem; protected instantiateClientItem(data: AlertClientItemData): MexMPCAlertClientItem; protected transformItemToNested(data: CreateMPCAlertItemInput): CreateAlertItemInput; protected transformItemUpdateToNested(data: UpdateMPCAlertItemInput): UpdateAlertItemInput; protected applyScopeToSort(sort?: MPCAlertSort): AlertSort | undefined; protected transformMpcDefaultsToNested(alertId: string, defaults?: MpcAlertDefaultsInput): { alertId: string; reportType: ReportType; defaults?: unknown; }; }