import { OrderIntentMerchant, OrderIntent } from '../../types/payment-method-management/OrderIntents.js'; import { CrossmintApiClient } from '@crossmint/common-sdk-base'; import { z } from 'zod'; import '../../types/payment-method-management/PaymentMethodAgenticEnrollment.js'; declare const registrationRailSchema: z.ZodIntersection; }, "strip", z.ZodTypeAny, { status: "pending" | "enabled"; }, { status: "pending" | "enabled"; }>, z.ZodEffects; error: z.ZodOptional>>; }, "strip", z.ZodTypeAny, { status: "error"; error?: { code: string; } | null | undefined; }, { status: "error"; error?: { code: string; } | null | undefined; }>, { status: "error"; error: { code: string; }; }, { status: "error"; error?: { code: string; } | null | undefined; }>]>, z.ZodDiscriminatedUnion<"rail", [z.ZodObject<{ rail: z.ZodLiteral<"agentic-token">; provider: z.ZodEnum<["vic", "agentpay"]>; }, "strip", z.ZodTypeAny, { rail: "agentic-token"; provider: "vic" | "agentpay"; }, { rail: "agentic-token"; provider: "vic" | "agentpay"; }>, z.ZodObject<{ rail: z.ZodLiteral<"spt">; provider: z.ZodLiteral<"stripe">; }, "strip", z.ZodTypeAny, { rail: "spt"; provider: "stripe"; }, { rail: "spt"; provider: "stripe"; }>]>>; type OrderIntentRegistrationRail = z.infer; interface OrderIntentRegistration { paymentMethodId: string; rails: OrderIntentRegistrationRail[]; } interface OrderIntentRegistrationRequest { email?: string; /** ISO 3166-1 alpha-2, upper case. */ countryCode?: string; languageCode?: string; } interface CreateOrderIntentRequest { paymentMethodId: string; /** `value` is a decimal string with up to 4 places, greater than 0; `currency` is a 3-letter code. */ amount: { value: string; currency: string; }; merchant?: OrderIntentMerchant; description: string; /** ISO 8601 datetime in the future. */ expiresAt: string; } /** * The one error class every call of `createOrderIntentsApi` throws: JSON 4xx bodies, transport * and 5xx failures from the shared client, and 2xx bodies that are empty or not the expected shape. * @experimental Wraps `/api/unstable` routes; the signature may change in a minor release. */ declare class OrderIntentsApiError extends Error { readonly status: number | undefined; readonly path: string; constructor(message: string, status: number | undefined, path: string); } type OrderIntentsApiProps = { apiClient: CrossmintApiClient; }; /** * Buyer-JWT authenticated calls behind `CrossmintAgentCardAuthorization`. Every request carries * `x-api-key` (client key) and `Authorization: Bearer ` through the shared API client, and * every failure surfaces as `OrderIntentsApiError`. * @experimental Wraps `/api/unstable` routes; the signature may change in a minor release. */ declare function createOrderIntentsApi({ apiClient }: OrderIntentsApiProps): { getRegistration: (paymentMethodId: string) => Promise; register: (paymentMethodId: string, request?: OrderIntentRegistrationRequest) => Promise; createOrderIntent: (request: CreateOrderIntentRequest) => Promise; getOrderIntent: (orderIntentId: string) => Promise; }; type OrderIntentsApi = ReturnType; export { type CreateOrderIntentRequest, type OrderIntentRegistration, type OrderIntentRegistrationRail, type OrderIntentRegistrationRequest, type OrderIntentsApi, OrderIntentsApiError, type OrderIntentsApiProps, createOrderIntentsApi };