UNPKG

@saleor/app-sdk

Version:

SDK for building great Saleor Apps

32 lines (30 loc) 759 B
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<AuthData | undefined>; set: (authData: AuthData) => Promise<void>; delete: (saleorApiUrl: string) => Promise<void>; getAll: () => Promise<AuthData[]>; /** * Inform that configuration is finished and correct */ isReady?: () => Promise<AplReadyResult>; isConfigured?: () => Promise<AplConfiguredResult>; } export type { APL, AplConfiguredResult, AplReadyResult, AuthData };