aia-kit
Version:
Read, Parse, Edit, Write, Analyze AIA/AIX/AIS files.
72 lines (71 loc) • 2.13 kB
TypeScript
/**
* Defines functions used to extract components, extensions, and assets from
* an AIA file.
*
*
* @file This file defines the AIAReader class.
* @author vishwas@kodular.io (Vishwas Adiga)
* @since 1.0.0
* @license
*/
import { type Entry } from "@zip.js/zip.js";
import { Project } from './project.js';
import { Screen } from "./screen.js";
import { Extension } from "./extension.js";
import { Asset } from "./asset.js";
/**
* Class that reads/parses an AIA file.
*
* @since 1.0.0
* @access public
*/
export declare class AIAReader {
/**
* Unzips and reads every file in an AIA and then parses it.
*
* @since 1.0.0
* @access public
*
* @param {Blob | String} fileOrUrl The AIA file, or a URL pointing to it.
*
* @return {Promise} A Promise object, when resolved, yields the parsed
* AIProject object.
*/
static parse(fileOrUrl: Blob | string): Promise<Project>;
/**
* Asynchronously reads every screen in the project.
*
* @since 1.0.0
* @access private
*
* @class
* @param {Array} files An array of files that have a filetype .scm or .bky.
* @return {Promise<Screen>} A Promise object, when resolved, yields the parsed
*
*/
static generateScreens(files: Entry[]): Promise<Screen[]>;
/**
* Asynchronously reads every extension used in the project.
*
* @since 1.0.0
* @access private
*
* @class
* @param {Array} files An array of files that have a filetype .json.
*
* @return {Promise<Array>} An array of AIExtension objects for the project being read.
*/
static generateExtensions(files: Entry[]): Promise<Extension[]>;
/**
* Asynchronously reads every asset uploaded to the project.
*
* @since 1.0.0
* @access private
*
* @class
* @param {Array} files An array of files present in the assets folderr of the AIA.
*
* @return {Promise<Array>} An array of AIAsset objects for the project being read.
*/
static generateAssets(files: Entry[]): Promise<Asset[]>;
}