import { JsonObject } from '../types'; export declare const MessageCodes: { readonly AppParams: "app_params"; readonly PaymentLinkSuccess: "payment_link_success"; readonly PaymentLinkClosed: "payment_link_closed"; readonly GuestCheckoutRedirectSuccess: "guest_checkout_redirect_success"; readonly Success: "success"; readonly Event: "event"; }; export type MessageCodesType = (typeof MessageCodes)[keyof typeof MessageCodes]; type MessageData = JsonObject; /** * Subscribes to a message from the parent window. * @param messageCode A message code to subscribe to. * @param onMessage Callback for when the message is received. * @param allowedOrigin The origin to allow messages from. * @param onValidateOrigin Callback to validate the origin of the message. * @returns */ export declare function subscribeToWindowMessage({ onMessage, allowedOrigin, onValidateOrigin, }: { onMessage: (data?: MessageData) => void; allowedOrigin: string; onValidateOrigin?: (origin: string) => Promise; }): () => void; export {}; //# sourceMappingURL=subscribeToWindowMessage.d.ts.map