@ar-agents/mercadopago 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -66,6 +66,23 @@ declare class MercadoPagoRateLimitError extends MercadoPagoError {
66
66
  retryAfterSeconds: number | null;
67
67
  constructor(endpoint: string, retryAfterSeconds: number | null, body?: unknown);
68
68
  }
69
+ /**
70
+ * Thrown when MP is overloaded and serves an HTML 503 page instead of a JSON
71
+ * error. The library detects content-type !== application/json on 5xx and
72
+ * raises this typed error so retry logic + agent UX can branch correctly.
73
+ */
74
+ declare class MercadoPagoOverloadedError extends MercadoPagoError {
75
+ constructor(endpoint: string, status: number);
76
+ }
77
+ /**
78
+ * Thrown when a request exceeds the configured `requestTimeoutMs`. Retried
79
+ * automatically up to `maxRetries`; this surfaces only when the budget runs
80
+ * out.
81
+ */
82
+ declare class MercadoPagoTimeoutError extends MercadoPagoError {
83
+ readonly timeoutMs: number;
84
+ constructor(endpoint: string, timeoutMs: number);
85
+ }
69
86
  /**
70
87
  * Maps an MP error response body to the most specific known error class. Falls
71
88
  * back to the generic MercadoPagoError when no specific pattern matches.
@@ -546,6 +563,50 @@ declare const InstallmentOfferSchema: z.ZodObject<{
546
563
  }, z.core.$loose>>;
547
564
  }, z.core.$loose>;
548
565
  type InstallmentOffer = z.infer<typeof InstallmentOfferSchema>;
566
+ declare const QrOrderSchema: z.ZodObject<{
567
+ in_store_order_id: z.ZodString;
568
+ qr_data: z.ZodString;
569
+ }, z.core.$loose>;
570
+ type QrOrder = z.infer<typeof QrOrderSchema>;
571
+ interface CreateQrPaymentParams {
572
+ /** Pre-configured POS external_id from MP dashboard. Required. */
573
+ externalPosId: string;
574
+ /** Total amount in ARS. */
575
+ totalAmount: number;
576
+ /** Display title shown to the buyer when scanning. */
577
+ title: string;
578
+ description?: string;
579
+ /** Webhook URL — MP fires `point_integration_wh` then `payment` topic. */
580
+ notificationUrl?: string;
581
+ /** Your-system identifier for correlation. */
582
+ externalReference?: string;
583
+ /** ISO 8601 expiration (default 10 min from now). */
584
+ expirationDate?: string;
585
+ /** Itemized line items (optional but improves analytics). */
586
+ items?: Array<{
587
+ title: string;
588
+ quantity: number;
589
+ unit_price: number;
590
+ unit_measure?: string;
591
+ total_amount?: number;
592
+ }>;
593
+ }
594
+ declare const CardTokenSchema: z.ZodObject<{
595
+ id: z.ZodString;
596
+ status: z.ZodOptional<z.ZodString>;
597
+ date_due: z.ZodOptional<z.ZodString>;
598
+ card_id: z.ZodOptional<z.ZodString>;
599
+ cardholder: z.ZodOptional<z.ZodUnknown>;
600
+ }, z.core.$loose>;
601
+ type CardToken = z.infer<typeof CardTokenSchema>;
602
+ interface CreateCardTokenParams {
603
+ /** Saved card id (from list_customer_cards). */
604
+ cardId: string;
605
+ /** Customer that owns the card. */
606
+ customerId: string;
607
+ /** CVV — required for AR; MP doesn't store CVV. */
608
+ securityCode: string;
609
+ }
549
610
  declare const AccountInfoSchema: z.ZodObject<{
550
611
  id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
551
612
  email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -558,6 +619,186 @@ declare const AccountInfoSchema: z.ZodObject<{
558
619
  }, z.core.$loose>>>;
559
620
  }, z.core.$loose>;
560
621
  type AccountInfo = z.infer<typeof AccountInfoSchema>;
622
+ /**
623
+ * A reusable subscription plan. Different from a per-customer subscription:
624
+ * a plan defines the price + frequency once, then customers subscribe to it
625
+ * via `subscribe_to_plan` (which creates a preapproval pointing at the plan).
626
+ *
627
+ * Use plans for SaaS-style billing where you have a fixed set of tiers
628
+ * (Básico/Pro/Enterprise) instead of negotiating amounts per customer.
629
+ */
630
+ declare const SubscriptionPlanSchema: z.ZodObject<{
631
+ id: z.ZodString;
632
+ status: z.ZodString;
633
+ reason: z.ZodString;
634
+ back_url: z.ZodOptional<z.ZodString>;
635
+ external_reference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
636
+ date_created: z.ZodString;
637
+ last_modified: z.ZodString;
638
+ auto_recurring: z.ZodObject<{
639
+ frequency: z.ZodNumber;
640
+ frequency_type: z.ZodEnum<{
641
+ months: "months";
642
+ days: "days";
643
+ }>;
644
+ transaction_amount: z.ZodNumber;
645
+ currency_id: z.ZodEnum<{
646
+ ARS: "ARS";
647
+ USD: "USD";
648
+ BRL: "BRL";
649
+ MXN: "MXN";
650
+ }>;
651
+ start_date: z.ZodOptional<z.ZodString>;
652
+ end_date: z.ZodOptional<z.ZodString>;
653
+ }, z.core.$strip>;
654
+ }, z.core.$loose>;
655
+ type SubscriptionPlan = z.infer<typeof SubscriptionPlanSchema>;
656
+ interface CreateSubscriptionPlanParams {
657
+ /** Customer-facing plan name shown at checkout. */
658
+ reason: string;
659
+ /** Where MP redirects buyer after first payment. HTTPS only. */
660
+ backUrl: string;
661
+ /** Recurrence (e.g., 1 + months = monthly). */
662
+ frequency: number;
663
+ frequencyType: FrequencyType;
664
+ /** Amount per cycle. */
665
+ amount: number;
666
+ /** ARS for AR. */
667
+ currency: CurrencyId;
668
+ /** Optional plan-level identifier from your system. */
669
+ externalReference?: string;
670
+ /** Free trial days before first charge. */
671
+ freeTrialFrequency?: number;
672
+ freeTrialFrequencyType?: FrequencyType;
673
+ }
674
+ declare const StoreSchema: z.ZodObject<{
675
+ id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
676
+ name: z.ZodOptional<z.ZodString>;
677
+ external_id: z.ZodOptional<z.ZodString>;
678
+ date_creation: z.ZodOptional<z.ZodString>;
679
+ location: z.ZodOptional<z.ZodObject<{
680
+ address_line: z.ZodOptional<z.ZodString>;
681
+ city_name: z.ZodOptional<z.ZodString>;
682
+ state_name: z.ZodOptional<z.ZodString>;
683
+ country_id: z.ZodOptional<z.ZodString>;
684
+ latitude: z.ZodOptional<z.ZodNumber>;
685
+ longitude: z.ZodOptional<z.ZodNumber>;
686
+ }, z.core.$loose>>;
687
+ }, z.core.$loose>;
688
+ type Store = z.infer<typeof StoreSchema>;
689
+ interface CreateStoreParams {
690
+ /** Display name for the store. */
691
+ name: string;
692
+ /** Caller-defined identifier (must be unique within the seller's stores). */
693
+ externalId: string;
694
+ /** Optional physical location. */
695
+ location?: {
696
+ addressLine?: string;
697
+ cityName?: string;
698
+ stateName?: string;
699
+ countryId?: string;
700
+ latitude?: number;
701
+ longitude?: number;
702
+ };
703
+ }
704
+ declare const PosSchema: z.ZodObject<{
705
+ id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
706
+ name: z.ZodOptional<z.ZodString>;
707
+ external_id: z.ZodOptional<z.ZodString>;
708
+ store_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
709
+ category: z.ZodOptional<z.ZodNumber>;
710
+ fixed_amount: z.ZodOptional<z.ZodBoolean>;
711
+ qr: z.ZodOptional<z.ZodObject<{
712
+ template_image: z.ZodOptional<z.ZodString>;
713
+ image: z.ZodOptional<z.ZodString>;
714
+ }, z.core.$loose>>;
715
+ date_creation: z.ZodOptional<z.ZodString>;
716
+ }, z.core.$loose>;
717
+ type Pos = z.infer<typeof PosSchema>;
718
+ interface CreatePosParams {
719
+ /** Display name. */
720
+ name: string;
721
+ /** Caller-defined POS id (used in QR endpoints; unique within store). */
722
+ externalId: string;
723
+ /** Parent store id (number from createStore). */
724
+ storeId: string | number;
725
+ /** MP category code (default 621102 = Other Food and Beverage Services). */
726
+ category?: number;
727
+ /** If true, the QR has a fixed amount; if false, dynamic per-order. */
728
+ fixedAmount?: boolean;
729
+ }
730
+ declare const DisputeSchema: z.ZodObject<{
731
+ id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
732
+ status: z.ZodString;
733
+ resource: z.ZodOptional<z.ZodString>;
734
+ resource_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
735
+ amount: z.ZodOptional<z.ZodNumber>;
736
+ date_created: z.ZodOptional<z.ZodString>;
737
+ reason: z.ZodOptional<z.ZodString>;
738
+ resolution: z.ZodOptional<z.ZodObject<{
739
+ reason: z.ZodOptional<z.ZodString>;
740
+ result: z.ZodOptional<z.ZodString>;
741
+ date: z.ZodOptional<z.ZodString>;
742
+ }, z.core.$loose>>;
743
+ documents: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
744
+ reason_description: z.ZodOptional<z.ZodString>;
745
+ }, z.core.$loose>;
746
+ type Dispute = z.infer<typeof DisputeSchema>;
747
+ declare const SubscriptionPaymentSchema: z.ZodObject<{
748
+ id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
749
+ preapproval_id: z.ZodOptional<z.ZodString>;
750
+ status: z.ZodString;
751
+ payment_id: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
752
+ transaction_amount: z.ZodOptional<z.ZodNumber>;
753
+ currency_id: z.ZodOptional<z.ZodString>;
754
+ date_created: z.ZodOptional<z.ZodString>;
755
+ debit_date: z.ZodOptional<z.ZodString>;
756
+ next_retry_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
757
+ retry_attempt: z.ZodOptional<z.ZodNumber>;
758
+ reason: z.ZodOptional<z.ZodString>;
759
+ }, z.core.$loose>;
760
+ type SubscriptionPayment = z.infer<typeof SubscriptionPaymentSchema>;
761
+ declare const IdentificationTypeSchema: z.ZodObject<{
762
+ id: z.ZodString;
763
+ name: z.ZodString;
764
+ type: z.ZodString;
765
+ min_length: z.ZodOptional<z.ZodNumber>;
766
+ max_length: z.ZodOptional<z.ZodNumber>;
767
+ }, z.core.$loose>;
768
+ type IdentificationType = z.infer<typeof IdentificationTypeSchema>;
769
+ declare const IssuerSchema: z.ZodObject<{
770
+ id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
771
+ name: z.ZodString;
772
+ secure_thumbnail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
773
+ thumbnail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
774
+ processing_mode: z.ZodOptional<z.ZodString>;
775
+ status: z.ZodOptional<z.ZodString>;
776
+ }, z.core.$loose>;
777
+ type Issuer = z.infer<typeof IssuerSchema>;
778
+ /** Topics MP can fire webhooks for. Add more as MP exposes them. */
779
+ declare const WebhookTopicSchema: z.ZodEnum<{
780
+ payment: "payment";
781
+ subscription_authorized_payment: "subscription_authorized_payment";
782
+ subscription_preapproval: "subscription_preapproval";
783
+ merchant_order: "merchant_order";
784
+ point_integration_wh: "point_integration_wh";
785
+ stop_delivery_op_wh: "stop_delivery_op_wh";
786
+ }>;
787
+ type WebhookTopic = z.infer<typeof WebhookTopicSchema>;
788
+ declare const WebhookConfigSchema: z.ZodObject<{
789
+ id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
790
+ url: z.ZodOptional<z.ZodString>;
791
+ status: z.ZodOptional<z.ZodString>;
792
+ topic: z.ZodOptional<z.ZodString>;
793
+ date_created: z.ZodOptional<z.ZodString>;
794
+ date_modified: z.ZodOptional<z.ZodString>;
795
+ }, z.core.$loose>;
796
+ type WebhookConfig = z.infer<typeof WebhookConfigSchema>;
797
+ interface CreateWebhookParams {
798
+ url: string;
799
+ /** Topic to subscribe to. */
800
+ topic: WebhookTopic | string;
801
+ }
561
802
 
562
803
  interface MercadoPagoClientOptions {
563
804
  /** Access token. TEST- prefix for sandbox, APP_USR- for production. */
@@ -572,6 +813,29 @@ interface MercadoPagoClientOptions {
572
813
  * inject your own retry/instrumentation layer or to test with MSW.
573
814
  */
574
815
  fetch?: typeof fetch;
816
+ /**
817
+ * Per-request timeout in ms. Aborts the request and throws if exceeded.
818
+ * Default 30_000 (30s). MP can be slow under load; 30s is a safe upper bound.
819
+ */
820
+ requestTimeoutMs?: number;
821
+ /**
822
+ * Number of retries on 5xx + network errors. Default 1 (single retry).
823
+ * 4xx errors are NEVER retried (they're user/config errors). Each retry
824
+ * uses exponential backoff: 250ms, 500ms, 1000ms, ...
825
+ */
826
+ maxRetries?: number;
827
+ /**
828
+ * Observability hook fired AFTER every request (success or failure).
829
+ * Useful for logging, metrics, tracing. Synchronous, fire-and-forget.
830
+ */
831
+ onCall?: (event: {
832
+ method: string;
833
+ path: string;
834
+ durationMs: number;
835
+ httpStatus: number | null;
836
+ retried: number;
837
+ success: boolean;
838
+ }) => void;
575
839
  }
576
840
  /**
577
841
  * Thin, typed wrapper around Mercado Pago's REST API. Exposes the surface
@@ -584,6 +848,9 @@ declare class MercadoPagoClient {
584
848
  private readonly accessToken;
585
849
  private readonly baseUrl;
586
850
  private readonly fetchImpl;
851
+ private readonly requestTimeoutMs;
852
+ private readonly maxRetries;
853
+ private readonly onCall;
587
854
  constructor(options: MercadoPagoClientOptions);
588
855
  private request;
589
856
  /**
@@ -684,6 +951,152 @@ declare class MercadoPagoClient {
684
951
  }): Promise<InstallmentOffer[]>;
685
952
  /** Get info about the account that owns this access token. */
686
953
  getMe(): Promise<AccountInfo>;
954
+ /**
955
+ * Create a single-use card token from a saved card. This is the server-side
956
+ * retokenization path (PCI-safe because the card data lives in MP's vault,
957
+ * we only pass the saved card_id + customer_id + the user-supplied CVV).
958
+ *
959
+ * Tokens expire in 7 days but typically burn on first use. AR currently
960
+ * REQUIRES CVV on every charge (MP doesn't store it); skipping CVV requires
961
+ * a private MP product enablement, not a public API.
962
+ */
963
+ createCardToken(params: CreateCardTokenParams): Promise<CardToken>;
964
+ /**
965
+ * High-level helper: charge a saved card in 3 steps.
966
+ * 1. Mint a card token from {customer_id, card_id, security_code}
967
+ * 2. Lookup card to fill payment_method_id (avoids agent guessing)
968
+ * 3. Create the payment with the token + idempotency key
969
+ *
970
+ * Returns the resulting Payment. Uses deterministic idempotency from
971
+ * (card_id, amount, externalReference) so retries dedupe on MP's side.
972
+ */
973
+ chargeSavedCard(params: {
974
+ customerId: string;
975
+ cardId: string;
976
+ securityCode: string;
977
+ amount: number;
978
+ description: string;
979
+ installments?: number;
980
+ externalReference?: string;
981
+ statementDescriptor?: string;
982
+ idempotencyKey?: string;
983
+ }): Promise<Payment>;
984
+ /**
985
+ * Create a dynamic in-store QR order. Returns `qr_data` (EMVCo TLV string)
986
+ * + `in_store_order_id`. The buyer scans the QR with any AR wallet (Modo,
987
+ * BNA+, Cuenta DNI, Naranja X, etc. — interop is mandated by Transferencias
988
+ * 3.0). On payment, MP fires `point_integration_wh` then `payment` topics.
989
+ *
990
+ * Requires a pre-configured POS (`external_pos_id` from MP dashboard or
991
+ * `POST /pos`). The seller's `user_id` is auto-fetched from `/users/me`.
992
+ *
993
+ * The lib does NOT render the QR image — pass `qr_data` to a QR renderer
994
+ * (e.g., `qrcode` package) to get a data URL. The agent tool layer wraps
995
+ * this and returns both raw + data URL.
996
+ */
997
+ createQrPayment(userId: string, params: CreateQrPaymentParams): Promise<QrOrder>;
998
+ /**
999
+ * Cancel a pending QR order on a POS. Necessary if the buyer never scans
1000
+ * — otherwise the next `createQrPayment` on the same POS returns 409.
1001
+ */
1002
+ cancelQrPayment(userId: string, externalPosId: string): Promise<void>;
1003
+ /**
1004
+ * Create a reusable subscription plan. Customers later subscribe to it via
1005
+ * `subscribeToPlan` (which creates a preapproval pointing at the plan).
1006
+ *
1007
+ * Use this when you have fixed tiers (Básico/Pro/Enterprise). For custom
1008
+ * per-customer amounts, skip plans and use `createPreapproval` directly.
1009
+ */
1010
+ createSubscriptionPlan(params: CreateSubscriptionPlanParams): Promise<SubscriptionPlan>;
1011
+ getSubscriptionPlan(id: string): Promise<SubscriptionPlan>;
1012
+ listSubscriptionPlans(params?: {
1013
+ limit?: number;
1014
+ offset?: number;
1015
+ status?: string;
1016
+ }): Promise<{
1017
+ paging: {
1018
+ total: number;
1019
+ limit: number;
1020
+ offset: number;
1021
+ };
1022
+ results: SubscriptionPlan[];
1023
+ }>;
1024
+ updateSubscriptionPlan(id: string, patch: {
1025
+ reason?: string;
1026
+ status?: "active" | "cancelled";
1027
+ amount?: number;
1028
+ backUrl?: string;
1029
+ }): Promise<SubscriptionPlan>;
1030
+ /**
1031
+ * Subscribe a customer to an existing plan. Returns a Preapproval with
1032
+ * `init_point` URL where the buyer completes the first payment.
1033
+ */
1034
+ subscribeToPlan(params: {
1035
+ planId: string;
1036
+ payerEmail: string;
1037
+ cardTokenId?: string;
1038
+ externalReference?: string;
1039
+ }): Promise<Preapproval>;
1040
+ /**
1041
+ * List the auto-charge attempts (authorized_payments) under a preapproval.
1042
+ * Useful for "show me the cobros of the last 6 months for this client".
1043
+ */
1044
+ listSubscriptionPayments(preapprovalId: string, params?: {
1045
+ limit?: number;
1046
+ offset?: number;
1047
+ }): Promise<{
1048
+ paging: {
1049
+ total: number;
1050
+ limit: number;
1051
+ offset: number;
1052
+ };
1053
+ results: SubscriptionPayment[];
1054
+ }>;
1055
+ /** Create a store for the seller. POSes (for QR) live under stores. */
1056
+ createStore(userId: string, params: CreateStoreParams): Promise<Store>;
1057
+ listStores(userId: string, params?: {
1058
+ limit?: number;
1059
+ offset?: number;
1060
+ }): Promise<{
1061
+ paging: {
1062
+ total: number;
1063
+ limit: number;
1064
+ offset: number;
1065
+ };
1066
+ results: Store[];
1067
+ }>;
1068
+ /** Create a POS under a store. The POS's `external_id` is what `createQrPayment` uses. */
1069
+ createPos(params: CreatePosParams): Promise<Pos>;
1070
+ listPos(params?: {
1071
+ storeId?: string | number;
1072
+ limit?: number;
1073
+ offset?: number;
1074
+ }): Promise<{
1075
+ paging: {
1076
+ total: number;
1077
+ limit: number;
1078
+ offset: number;
1079
+ };
1080
+ results: Pos[];
1081
+ }>;
1082
+ listPaymentDisputes(paymentId: string): Promise<Dispute[]>;
1083
+ getDispute(paymentId: string, disputeId: string): Promise<Dispute>;
1084
+ /** List valid identification types for the seller's site. AR returns DNI/CI/LE/LC/Otro/Pasaporte/CUIT/CUIL. */
1085
+ listIdentificationTypes(): Promise<IdentificationType[]>;
1086
+ /** List card issuers for a payment method. Useful with `bin` for installments. */
1087
+ listIssuers(params: {
1088
+ paymentMethodId: string;
1089
+ bin?: string;
1090
+ }): Promise<Issuer[]>;
1091
+ /** List configured webhook subscriptions. */
1092
+ listWebhooks(): Promise<WebhookConfig[]>;
1093
+ /** Create a webhook subscription for a topic. */
1094
+ createWebhook(params: CreateWebhookParams): Promise<WebhookConfig>;
1095
+ updateWebhook(id: string, patch: {
1096
+ url?: string;
1097
+ topic?: string;
1098
+ }): Promise<WebhookConfig>;
1099
+ deleteWebhook(id: string): Promise<void>;
687
1100
  }
688
1101
 
689
1102
  /**
@@ -752,7 +1165,7 @@ interface MercadoPagoToolsOptions {
752
1165
  */
753
1166
  notificationUrl?: string;
754
1167
  }
755
- type ToolName = "create_subscription" | "get_subscription_status" | "cancel_subscription" | "pause_subscription" | "resume_subscription" | "create_payment" | "get_payment" | "search_payments" | "cancel_payment" | "capture_payment" | "refund_payment" | "list_refunds" | "create_payment_preference" | "get_payment_preference" | "create_customer" | "find_customer_by_email" | "list_customer_cards" | "delete_customer_card" | "list_payment_methods" | "calculate_installments" | "get_account_info";
1168
+ type ToolName = "create_subscription" | "get_subscription_status" | "cancel_subscription" | "pause_subscription" | "resume_subscription" | "create_payment" | "get_payment" | "search_payments" | "cancel_payment" | "capture_payment" | "refund_payment" | "list_refunds" | "create_payment_preference" | "get_payment_preference" | "create_customer" | "find_customer_by_email" | "list_customer_cards" | "delete_customer_card" | "list_payment_methods" | "calculate_installments" | "get_account_info" | "charge_saved_card" | "create_qr_payment" | "cancel_qr_payment" | "create_subscription_plan" | "list_subscription_plans" | "update_subscription_plan" | "subscribe_to_plan" | "list_subscription_payments" | "create_store" | "list_stores" | "create_pos" | "list_pos" | "list_payment_disputes" | "get_dispute" | "list_identification_types" | "list_issuers" | "list_webhooks" | "create_webhook" | "update_webhook" | "delete_webhook";
756
1169
  /**
757
1170
  * Build a tool set for the Vercel AI SDK that exposes Mercado Pago to an
758
1171
  * agent. Pass directly to `Experimental_Agent`'s `tools` option, or merge with
@@ -818,4 +1231,4 @@ declare function verifyWebhookSignature(params: {
818
1231
  secret: string;
819
1232
  }): boolean;
820
1233
 
821
- export { type AccountInfo, type AutoRecurring, type CreateCustomerParams, type CreatePaymentParams, type CreatePreapprovalParams, type CreatePreferenceParams, type CreateRefundParams, type CurrencyId, type Customer, type CustomerCard, type FrequencyType, InMemoryStateAdapter, type InstallmentOffer, MercadoPagoAccountTypeMismatchError, MercadoPagoAuthError, MercadoPagoAuthorizeForbiddenError, MercadoPagoBackUrlInvalidError, MercadoPagoClient, type MercadoPagoClientOptions, MercadoPagoError, MercadoPagoPaymentRejectedError, MercadoPagoRateLimitError, MercadoPagoSelfPaymentError, type MercadoPagoToolsOptions, type ParsedWebhookEvent, type Payment, type PaymentMethod, type PaymentStatus, type PaymentsSearchResult, type Preapproval, type PreapprovalStatus, type Preference, type PreferenceItem, type Refund, type SearchPaymentsParams, type SiteId, type SubscriptionStateAdapter, type SubscriptionStateRecord, type WebhookBody, classifyError, mercadoPagoTools, parseWebhookEvent, verifyWebhookSignature };
1234
+ export { type AccountInfo, type AutoRecurring, type CardToken, type CreateCardTokenParams, type CreateCustomerParams, type CreatePaymentParams, type CreatePosParams, type CreatePreapprovalParams, type CreatePreferenceParams, type CreateQrPaymentParams, type CreateRefundParams, type CreateStoreParams, type CreateSubscriptionPlanParams, type CreateWebhookParams, type CurrencyId, type Customer, type CustomerCard, type Dispute, type FrequencyType, type IdentificationType, InMemoryStateAdapter, type InstallmentOffer, type Issuer, MercadoPagoAccountTypeMismatchError, MercadoPagoAuthError, MercadoPagoAuthorizeForbiddenError, MercadoPagoBackUrlInvalidError, MercadoPagoClient, type MercadoPagoClientOptions, MercadoPagoError, MercadoPagoOverloadedError, MercadoPagoPaymentRejectedError, MercadoPagoRateLimitError, MercadoPagoSelfPaymentError, MercadoPagoTimeoutError, type MercadoPagoToolsOptions, type ParsedWebhookEvent, type Payment, type PaymentMethod, type PaymentStatus, type PaymentsSearchResult, type Pos, type Preapproval, type PreapprovalStatus, type Preference, type PreferenceItem, type QrOrder, type Refund, type SearchPaymentsParams, type SiteId, type Store, type SubscriptionPayment, type SubscriptionPlan, type SubscriptionStateAdapter, type SubscriptionStateRecord, type WebhookBody, type WebhookConfig, type WebhookTopic, classifyError, mercadoPagoTools, parseWebhookEvent, verifyWebhookSignature };