Skip to content

@vtj / Modules / core / Service

Class: Service

core.Service

Table of contents

Constructors

Methods

Constructors

constructor

new Service(): Service

Returns

Service

Methods

clearStaticFiles

clearStaticFiles(projectId): Promise<boolean>

Parameters

NameType
projectIdstring

Returns

Promise<boolean>

Defined in

packages/core/src/protocols/service.ts:57


createRawPage

createRawPage(file): Promise<boolean>

Parameters

NameType
filePageFile

Returns

Promise<boolean>

Defined in

packages/core/src/protocols/service.ts:45


genVueContent

genVueContent(project, dsl): Promise<string>

Parameters

NameType
projectProjectSchema
dslBlockSchema

Returns

Promise<string>

Defined in

packages/core/src/protocols/service.ts:40


getFile

getFile(id): Promise<BlockSchema>

Parameters

NameType
idstring

Returns

Promise<BlockSchema>

Defined in

packages/core/src/protocols/service.ts:21


getHistory

getHistory(id): Promise<HistorySchema>

Parameters

NameType
idstring

Returns

Promise<HistorySchema>

Defined in

packages/core/src/protocols/service.ts:25


getHistoryItem

getHistoryItem(fId, id): Promise<HistoryItem>

Parameters

NameType
fIdstring
idstring

Returns

Promise<HistoryItem>

Defined in

packages/core/src/protocols/service.ts:26


getPluginMaterial

getPluginMaterial(from): Promise<null | MaterialDescription>

Parameters

NameType
fromNodeFromPlugin

Returns

Promise<null | MaterialDescription>

Defined in

packages/core/src/protocols/service.ts:59


getStaticFiles

getStaticFiles(projectId): Promise<StaticFileInfo[]>

Parameters

NameType
projectIdstring

Returns

Promise<StaticFileInfo[]>

Defined in

packages/core/src/protocols/service.ts:52


init

init(project): Promise<ProjectSchema>

Parameters

NameType
projectProjectSchema

Returns

Promise<ProjectSchema>

Defined in

packages/core/src/protocols/service.ts:14


publish

publish(project): Promise<boolean>

Parameters

NameType
projectProjectSchema

Returns

Promise<boolean>

Defined in

packages/core/src/protocols/service.ts:35


publishFile

publishFile(project, file): Promise<boolean>

Parameters

NameType
projectProjectSchema
fileBlockFile | PageFile

Returns

Promise<boolean>

Defined in

packages/core/src/protocols/service.ts:36


removeFile

removeFile(id): Promise<boolean>

Parameters

NameType
idstring

Returns

Promise<boolean>

Defined in

packages/core/src/protocols/service.ts:22


removeHistory

removeHistory(id): Promise<boolean>

Parameters

NameType
idstring

Returns

Promise<boolean>

Defined in

packages/core/src/protocols/service.ts:24


removeHistoryItem

removeHistoryItem(fId, ids): Promise<boolean>

Parameters

NameType
fIdstring
idsstring[]

Returns

Promise<boolean>

Defined in

packages/core/src/protocols/service.ts:31


removeRawPage

removeRawPage(id): Promise<boolean>

Parameters

NameType
idstring

Returns

Promise<boolean>

Defined in

packages/core/src/protocols/service.ts:46


removeStaticFile

removeStaticFile(name, projectId): Promise<boolean>

Parameters

NameType
namestring
projectIdstring

Returns

Promise<boolean>

Defined in

packages/core/src/protocols/service.ts:53


saveFile

saveFile(file): Promise<boolean>

Parameters

NameType
fileBlockSchema

Returns

Promise<boolean>

Defined in

packages/core/src/protocols/service.ts:20


saveHistory

saveHistory(history): Promise<boolean>

Parameters

NameType
historyHistorySchema

Returns

Promise<boolean>

Defined in

packages/core/src/protocols/service.ts:23


saveHistoryItem

saveHistoryItem(fId, item): Promise<boolean>

Parameters

NameType
fIdstring
itemHistoryItem

Returns

Promise<boolean>

Defined in

packages/core/src/protocols/service.ts:27


saveMaterials

saveMaterials(project, materials): Promise<boolean>

Parameters

NameType
projectProjectSchema
materialsMap<string, MaterialDescription>

Returns

Promise<boolean>

Defined in

packages/core/src/protocols/service.ts:16


saveProject

saveProject(project): Promise<boolean>

Parameters

NameType
projectProjectSchema

Returns

Promise<boolean>

Defined in

packages/core/src/protocols/service.ts:15


uploadStaticFile

uploadStaticFile(file, projectId): Promise<null | StaticFileInfo>

Parameters

NameType
fileFile
projectIdstring

Returns

Promise<null | StaticFileInfo>

Defined in

packages/core/src/protocols/service.ts:48

Released under the MIT License.