/** * AIT file writer implementation. */ import { PlatformType } from "@apps-in-toss/ait-format-proto"; export interface AITWriterOptions { /** Application name (required) */ appName: string; /** Unique identifier for this deployment. If not provided, a UUIDv7 will be auto-generated. */ deploymentId?: string; /** AIT format version (default: current version) */ formatVersion?: number; /** Creator info string (e.g., "my-service/1.0.0") */ createdBy?: string; } export interface MetadataOptions { /** Whether this is a game app */ isGame?: boolean; /** Platform type (WEB or REACT_NATIVE) */ platform?: PlatformType; /** Runtime version string */ runtimeVersion?: string; /** List of bundle file names */ bundleFiles?: string[]; /** Package JSON content */ packageJson?: Record; /** Additional metadata */ extra?: Record; /** SDK Version */ sdkVersion?: string; } /** * Writer for AIT (Apps-in-Toss) bundle files. * * @example * ```typescript * // With auto-generated UUIDv7 * const writer = new AITWriter({ appName: "my-app" }); * writer.setMetadata({ isGame: false, platform: PlatformType.WEB }); * writer.addFile("index.html", new TextEncoder().encode("...")); * const buffer = await writer.toBuffer(); * * // With explicit deployment ID * const writer = new AITWriter({ * deploymentId: "019bfa90-ad4c-799f-b227-b4159e6867f7", * appName: "my-app" * }); * ``` */ export declare class AITWriter { private readonly formatVersion; private readonly deploymentId; private readonly appName; private readonly createdBy; private metadata; private readonly permissions; private readonly files; private signature; constructor(options: AITWriterOptions); /** * Set the bundle metadata. */ setMetadata(options: MetadataOptions): this; /** * Add a permission entry. */ addPermission(name: string, access: string): this; /** * Add a file to the bundle. */ addFile(name: string, data: Uint8Array, options?: { compress?: boolean; }): this; /** * Set the digital signature. */ setSignature(signature: Uint8Array): this; /** * Build the ZIP blob and index entries. */ private buildZipBlob; /** * Build the bundle protobuf message. */ private buildBundle; /** * Serialize the AIT bundle to a buffer. */ toBuffer(): Promise; } //# sourceMappingURL=writer.d.ts.map