interface AuthData { token: string; saleorApiUrl: string; appId: string; jwks?: string; } type AplReadyResult = { ready: true; } | { ready: false; error: Error; }; type AplConfiguredResult = { configured: true; } | { configured: false; error: Error; }; interface APL { get: (saleorApiUrl: string) => Promise; set: (authData: AuthData) => Promise; delete: (saleorApiUrl: string) => Promise; getAll: () => Promise; /** * Inform that configuration is finished and correct */ isReady?: () => Promise; isConfigured?: () => Promise; } export type { APL, AplConfiguredResult, AplReadyResult, AuthData };