import * as z from 'zod'; import RestApi from '@signageos/sdk/dist/RestApi/RestApi'; import { ICustomScriptVersion } from '@signageos/sdk/dist/RestApi/CustomScript/Version/ICustomScriptVersion'; export declare const PlatformSchema: z.ZodObject<{ /** List of files/directories that are part of the custom script for a particular platform. */ rootDir: z.ZodString; /** Main file of the particular platform script that will be executed. */ mainFile: z.ZodString; /** What type of runtime is the script for the particular platform (i.e. node.js, bash,...). */ runtime: z.ZodString; }, "strict", z.ZodTypeAny, { rootDir: string; mainFile: string; runtime: string; }, { rootDir: string; mainFile: string; runtime: string; }>; export type PlatformConfig = z.infer; declare const ConfigSchema: z.ZodObject<{ uid: z.ZodOptional; name: z.ZodString; version: z.ZodString; description: z.ZodOptional; dangerLevel: z.ZodOptional; sos: z.ZodOptional; }, "strip", z.ZodTypeAny, { '@signageos/front-applet'?: string | undefined; }, { '@signageos/front-applet'?: string | undefined; }>>; /** * Config of individual custom script implementations for each target platform. * * A Custom Script is only a virtual unit that consists of multiple platform-specific scripts. * This record is a mapping of platform names to their respective platform-specific scripts. */ platforms: z.ZodRecord>; configDefinition: z.ZodArray, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">; }, "strip", z.ZodTypeAny, { version: string; name: string; platforms: Record; configDefinition: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[]; description?: string | undefined; sos?: { '@signageos/front-applet'?: string | undefined; } | undefined; uid?: string | undefined; dangerLevel?: string | undefined; }, { version: string; name: string; platforms: Record; configDefinition: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[]; description?: string | undefined; sos?: { '@signageos/front-applet'?: string | undefined; } | undefined; uid?: string | undefined; dangerLevel?: string | undefined; }>; export type CustomScriptConfig = z.infer; /** * Represents archive with Custom Script code for a particular platform */ export interface CodeArchive { filePath: string; md5Checksum: string; delete(): Promise; } /** * Load and validate the config file .sosconfig.json */ export declare function getConfig(workDir: string): Promise<{ version: string; name: string; platforms: Record; configDefinition: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[]; description?: string | undefined; sos?: { '@signageos/front-applet'?: string | undefined; } | undefined; uid?: string | undefined; dangerLevel?: string | undefined; }>; /** * Add data to the config file .sosconfig.json */ export declare function addToConfigFile(workDir: string, data: Partial): Promise; export declare function ensureCustomScriptVersion(restApi: RestApi, config: CustomScriptConfig, skipConfirmation?: boolean, organizationUid?: string): Promise; export declare function uploadCode({ restApi, workDir, platform, config, customScriptVersion, }: { restApi: RestApi; workDir: string; platform: string; config: PlatformConfig; customScriptVersion: ICustomScriptVersion; }): Promise; export {};