@bitbybit-dev/core
Version:
Bit By Bit Developers Core CAD API to Program Geometry
142 lines (141 loc) • 3.72 kB
TypeScript
export declare namespace Asset {
class GetAssetDto {
constructor(fileName?: string);
/**
* The fileName associated with the projects asset
* @default undefined
*/
fileName: string;
}
class FetchDto {
constructor(url?: string);
/**
* The url to fetch from
* @default undefined
*/
url: string;
}
class FileDto {
constructor(file?: File | Blob);
/**
* Asset file that was loaded
* @default undefined
*/
file: File | Blob;
}
class FilesDto {
constructor(files?: (File | Blob)[]);
/**
* Asset file that was loaded
* @default undefined
*/
files: (File | Blob)[];
}
class AssetFileDto {
constructor(assetFile?: File, hidden?: boolean);
/**
* Asset file that was loaded
* @default undefined
*/
assetFile: File;
/**
* Import the asset hidden
* @default false
*/
hidden: boolean;
}
class AssetFileByUrlDto {
constructor(assetFile?: string, rootUrl?: string, hidden?: boolean);
/**
* Asset file name
* @default undefined
*/
assetFile: string;
/**
* Root url
* @default undefined
*/
rootUrl: string;
/**
* Import the asset hidden
* @default false
*/
hidden: boolean;
}
class DownloadDto {
constructor(fileName?: string, content?: string | Blob, extension?: string, contentType?: string);
/**
* The file name for the downloaded file
* @default undefined
*/
fileName: string;
/**
* The content to download (string or Blob)
* @default undefined
*/
content: string | Blob;
/**
* The file extension (without dot)
* @default txt
*/
extension: string;
/**
* The content type for the file
* @default text/plain
*/
contentType: string;
}
class AssetGlbDataDto {
constructor(glbData?: Uint8Array, fileName?: string, hidden?: boolean);
/**
* GLB binary data as Uint8Array (e.g., from OCCT convertStepToGltf)
* @default undefined
*/
glbData: Uint8Array;
/**
* Optional file name for the GLB (used for identification)
* @default model.glb
*/
fileName: string;
/**
* Import the asset hidden
* @default false
*/
hidden: boolean;
}
class BlobToFileDto {
constructor(blob?: Blob, fileName?: string, mimeType?: string);
/**
* The blob to convert to a file
* @default undefined
*/
blob: Blob;
/**
* The file name for the resulting file
* @default file
*/
fileName: string;
/**
* The MIME type for the file (optional, will use blob's type if not specified)
* @default undefined
* @optional true
*/
mimeType?: string;
}
class ArrayBufferToUint8ArrayDto {
constructor(arrayBuffer?: ArrayBuffer);
/**
* The ArrayBuffer to convert to Uint8Array
* @default undefined
*/
arrayBuffer: ArrayBuffer;
}
class Uint8ArrayToArrayBufferDto {
constructor(uint8Array?: Uint8Array);
/**
* The Uint8Array to convert to ArrayBuffer
* @default undefined
*/
uint8Array: Uint8Array;
}
}