Skip to content

@vtj


@vtj / renderer / BaseService

Class: BaseService

Extended by

Implements

  • Service

Constructors

new BaseService()

new BaseService(): BaseService

Returns

BaseService

Defined in

packages/renderer/types/services/base.d.ts:6

Properties

api()

protected api: (type, data) => Promise<any>

Parameters

type

string

data

any

Returns

Promise<any>

Defined in

packages/renderer/types/services/base.d.ts:3


uploader()

protected uploader: (file, projectId) => Promise<StaticFileInfo>

Parameters

file

File

projectId

string

Returns

Promise<StaticFileInfo>

Defined in

packages/renderer/types/services/base.d.ts:5

Methods

clearStaticFiles()

clearStaticFiles(projectId): Promise<boolean>

Parameters

projectId

string

Returns

Promise<boolean>

Implementation of

Service.clearStaticFiles

Defined in

packages/renderer/types/services/base.d.ts:28


createRawPage()

createRawPage(file): Promise<boolean>

Parameters

file

PageFile

Returns

Promise<boolean>

Implementation of

Service.createRawPage

Defined in

packages/renderer/types/services/base.d.ts:23


genSource()

genSource(project): Promise<string>

Parameters

project

ProjectSchema

Returns

Promise<string>

Implementation of

Service.genSource

Defined in

packages/renderer/types/services/base.d.ts:30


genVueContent()

genVueContent(project, dsl): Promise<string>

Parameters

project

ProjectSchema

dsl

BlockSchema

Returns

Promise<string>

Implementation of

Service.genVueContent

Defined in

packages/renderer/types/services/base.d.ts:22


getExtension()

getExtension(): Promise<undefined | ExtensionConfig>

Returns

Promise<undefined | ExtensionConfig>

Implementation of

Service.getExtension

Defined in

packages/renderer/types/services/base.d.ts:7


getFile()

getFile(id): Promise<BlockSchema>

Parameters

id

string

Returns

Promise<BlockSchema>

Implementation of

Service.getFile

Defined in

packages/renderer/types/services/base.d.ts:12


getHistory()

getHistory(id): Promise<HistorySchema>

Parameters

id

string

Returns

Promise<HistorySchema>

Implementation of

Service.getHistory

Defined in

packages/renderer/types/services/base.d.ts:16


getHistoryItem()

getHistoryItem(fId, id): Promise<HistoryItem>

Parameters

fId

string

id

string

Returns

Promise<HistoryItem>

Implementation of

Service.getHistoryItem

Defined in

packages/renderer/types/services/base.d.ts:17


getPluginMaterial()

getPluginMaterial(from): Promise<null | MaterialDescription>

Parameters

from

NodeFromPlugin

Returns

Promise<null | MaterialDescription>

Implementation of

Service.getPluginMaterial

Defined in

packages/renderer/types/services/base.d.ts:29


getStaticFiles()

getStaticFiles(projectId): Promise<StaticFileInfo[]>

Parameters

projectId

string

Returns

Promise<StaticFileInfo[]>

Implementation of

Service.getStaticFiles

Defined in

packages/renderer/types/services/base.d.ts:26


init()

init(project): Promise<ProjectSchema>

Parameters

project

ProjectSchema

Returns

Promise<ProjectSchema>

Implementation of

Service.init

Defined in

packages/renderer/types/services/base.d.ts:8


publish()

publish(project): Promise<boolean>

Parameters

project

ProjectSchema

Returns

Promise<boolean>

Implementation of

Service.publish

Defined in

packages/renderer/types/services/base.d.ts:20


publishFile()

publishFile(project, file): Promise<boolean>

Parameters

project

ProjectSchema

file

PageFile | BlockFile

Returns

Promise<boolean>

Implementation of

Service.publishFile

Defined in

packages/renderer/types/services/base.d.ts:21


removeFile()

removeFile(id): Promise<boolean>

Parameters

id

string

Returns

Promise<boolean>

Implementation of

Service.removeFile

Defined in

packages/renderer/types/services/base.d.ts:13


removeHistory()

removeHistory(id): Promise<boolean>

Parameters

id

string

Returns

Promise<boolean>

Implementation of

Service.removeHistory

Defined in

packages/renderer/types/services/base.d.ts:15


removeHistoryItem()

removeHistoryItem(fId, ids): Promise<boolean>

Parameters

fId

string

ids

string[]

Returns

Promise<boolean>

Implementation of

Service.removeHistoryItem

Defined in

packages/renderer/types/services/base.d.ts:19


removeRawPage()

removeRawPage(id): Promise<boolean>

Parameters

id

string

Returns

Promise<boolean>

Implementation of

Service.removeRawPage

Defined in

packages/renderer/types/services/base.d.ts:24


removeStaticFile()

removeStaticFile(name, projectId): Promise<boolean>

Parameters

name

string

projectId

string

Returns

Promise<boolean>

Implementation of

Service.removeStaticFile

Defined in

packages/renderer/types/services/base.d.ts:27


saveFile()

saveFile(file): Promise<boolean>

Parameters

file

BlockSchema

Returns

Promise<boolean>

Implementation of

Service.saveFile

Defined in

packages/renderer/types/services/base.d.ts:11


saveHistory()

saveHistory(history): Promise<boolean>

Parameters

history

HistorySchema

Returns

Promise<boolean>

Implementation of

Service.saveHistory

Defined in

packages/renderer/types/services/base.d.ts:14


saveHistoryItem()

saveHistoryItem(fId, item): Promise<boolean>

Parameters

fId

string

item

HistoryItem

Returns

Promise<boolean>

Implementation of

Service.saveHistoryItem

Defined in

packages/renderer/types/services/base.d.ts:18


saveMaterials()

saveMaterials(project, materials): Promise<boolean>

Parameters

project

ProjectSchema

materials

Map<string, MaterialDescription>

Returns

Promise<boolean>

Implementation of

Service.saveMaterials

Defined in

packages/renderer/types/services/base.d.ts:10


saveProject()

saveProject(project): Promise<boolean>

Parameters

project

ProjectSchema

Returns

Promise<boolean>

Implementation of

Service.saveProject

Defined in

packages/renderer/types/services/base.d.ts:9


uploadStaticFile()

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

Parameters

file

File

projectId

string

Returns

Promise<null | StaticFileInfo>

Implementation of

Service.uploadStaticFile

Defined in

packages/renderer/types/services/base.d.ts:25

Released under the MIT License.