Skip to main content

ExportsService

@lowcode/api


Class: ExportsService

Defined in: apps/api/src/modules/exports/exports.service.ts:40

Сервис для управления экспортом проектов.

Сохраняет артефакты на диске и отдаёт ссылку на скачивание.

Constructors​

Constructor​

new ExportsService(config, projectVersions): ExportsService

Defined in: apps/api/src/modules/exports/exports.service.ts:45

Parameters​

config​

ConfigService

projectVersions​

ProjectVersionsService

Returns​

ExportsService

Methods​

createExport()​

createExport(clientId, projectId, versionNumber, dto): Promise<{ capabilities: unknown; downloadUrl?: string; error?: string; expiresAt: number; exportId: string; missingSecrets?: string[]; progress?: number; stage?: string; status: ExportStatus; }>

Defined in: apps/api/src/modules/exports/exports.service.ts:56

Запускает экспорт указанной версии проекта.

Parameters​

clientId​

string

projectId​

string

versionNumber​

number

dto​

CreateExportDto

Returns​

Promise<{ capabilities: unknown; downloadUrl?: string; error?: string; expiresAt: number; exportId: string; missingSecrets?: string[]; progress?: number; stage?: string; status: ExportStatus; }>


getExportStatus()​

getExportStatus(clientId, exportId): ExportEntity

Defined in: apps/api/src/modules/exports/exports.service.ts:186

Возвращает статус экспорта.

Parameters​

clientId​

string

exportId​

string

Returns​

ExportEntity


getExportStream()​

getExportStream(clientId, exportId): object

Defined in: apps/api/src/modules/exports/exports.service.ts:213

Возвращает поток для скачивания архива экспорта.

Parameters​

clientId​

string

exportId​

string

Returns​

object

stream​

stream: Readable