UNPKG

@supernovaio/sdk

Version:

Supernova.io SDK

47 lines (46 loc) 1.23 kB
import { Supernova } from "./core/SDKSupernova"; export declare enum OutputFileType { copyRemoteUrl = "copyRemoteUrl", text = "text", binary = "binary" } export type OutputFile = { path: string; name: string; type: OutputFileType; }; export type OutputCopyRemoteURLFile = OutputFile & { url: string; type: OutputFileType.copyRemoteUrl; }; export type OutputTextFile = OutputFile & { content: string; type: OutputFileType.text; }; export type OutputBinaryFile = OutputFile & { data: ArrayBuffer; type: OutputFileType.binary; }; export type AnyOutputFile = OutputCopyRemoteURLFile | OutputTextFile | OutputBinaryFile; export declare enum PulsarExecutor { supernova = "supernova", local = "local" } export type PulsarContext = { executor: PulsarExecutor; wsId: string; dsId: string; versionId: string; brandId: string | null; /** * @deprecated * Use themeIds instead */ themeId: string | null; themeIds: string[] | null; isPreview: boolean; }; export interface PulsarBridgingInterface { export(fn: (sdk: Supernova, context: PulsarContext) => Promise<Array<AnyOutputFile>>): any; exportConfig<T extends object>(): T; }