UNPKG

@shopware-ag/meteor-admin-sdk

Version:

The Meteor SDK for the Shopware Administration.

38 lines (37 loc) 996 B
export declare enum MESSAGE_EVENT_TYPE { PAYMENT_CLOSE = "payment_close", PAYMENT_SUCCESS = "payment_success", PAYMENT_ERROR = "payment_error", SYNC_HEIGHT = "sync_height" } interface TokenPayload { 'license-toggles': { [key: string]: boolean; }; 'plan-name': string; 'plan-usage': string; 'plan-variant': string; aud: string; exp: number; iat: number; iss: string; nbf: number; swemp: string; } type Flow = { subscribe: (eventType: MESSAGE_EVENT_TYPE, callback: () => void) => { unsubscribe: () => void; }; }; export declare const addPaymentIframe: (el: HTMLElement, baseUrl: string, options: { shopUrl: string; swVersion: string; swUserLanguage: string; shopPlan?: string; }) => Promise<{ iframeEl: HTMLIFrameElement; unmount: () => void; }>; export declare const startPaymentFlow: () => Promise<Flow>; export declare const decodeLicense: () => Promise<TokenPayload | null>; export {};