Skip to content

@vtj / Modules / renderer / StorageService

Class: StorageService

renderer.StorageService

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new StorageService(): StorageService

Returns

StorageService

Inherited from

BaseService.constructor

Defined in

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

Properties

api

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

Type declaration

▸ (type, data): Promise<any>

Parameters
NameType
typestring
dataany
Returns

Promise<any>

Inherited from

BaseService.api

Defined in

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


uploader

Protected uploader: (file: File, projectId: string) => Promise<StaticFileInfo>

Type declaration

▸ (file, projectId): Promise<StaticFileInfo>

Parameters
NameType
fileFile
projectIdstring
Returns

Promise<StaticFileInfo>

Inherited from

BaseService.uploader

Defined in

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

Methods

clearStaticFiles

clearStaticFiles(projectId): Promise<boolean>

Parameters

NameType
projectIdstring

Returns

Promise<boolean>

Inherited from

BaseService.clearStaticFiles

Defined in

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


createRawPage

createRawPage(file): Promise<boolean>

Parameters

NameType
filePageFile

Returns

Promise<boolean>

Inherited from

BaseService.createRawPage

Defined in

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


genVueContent

genVueContent(project, dsl): Promise<string>

Parameters

NameType
projectProjectSchema
dslBlockSchema

Returns

Promise<string>

Inherited from

BaseService.genVueContent

Defined in

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


getFile

getFile(id): Promise<BlockSchema>

Parameters

NameType
idstring

Returns

Promise<BlockSchema>

Overrides

BaseService.getFile

Defined in

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


getHistory

getHistory(id): Promise<HistorySchema>

Parameters

NameType
idstring

Returns

Promise<HistorySchema>

Overrides

BaseService.getHistory

Defined in

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


getHistoryItem

getHistoryItem(fId, id): Promise<HistoryItem>

Parameters

NameType
fIdstring
idstring

Returns

Promise<HistoryItem>

Overrides

BaseService.getHistoryItem

Defined in

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


getPluginMaterial

getPluginMaterial(from): Promise<null | MaterialDescription>

Parameters

NameType
fromNodeFromPlugin

Returns

Promise<null | MaterialDescription>

Inherited from

BaseService.getPluginMaterial

Defined in

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


getStaticFiles

getStaticFiles(projectId): Promise<StaticFileInfo[]>

Parameters

NameType
projectIdstring

Returns

Promise<StaticFileInfo[]>

Inherited from

BaseService.getStaticFiles

Defined in

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


init

init(project): Promise<ProjectSchema>

Parameters

NameType
projectProjectSchema

Returns

Promise<ProjectSchema>

Overrides

BaseService.init

Defined in

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


publish

publish(project): Promise<boolean>

Parameters

NameType
projectProjectSchema

Returns

Promise<boolean>

Inherited from

BaseService.publish

Defined in

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


publishFile

publishFile(project, file): Promise<boolean>

Parameters

NameType
projectProjectSchema
filePageFile | BlockFile

Returns

Promise<boolean>

Inherited from

BaseService.publishFile

Defined in

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


removeFile

removeFile(id): Promise<boolean>

Parameters

NameType
idstring

Returns

Promise<boolean>

Overrides

BaseService.removeFile

Defined in

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


removeHistory

removeHistory(id): Promise<boolean>

Parameters

NameType
idstring

Returns

Promise<boolean>

Overrides

BaseService.removeHistory

Defined in

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


removeHistoryItem

removeHistoryItem(fId, ids): Promise<boolean>

Parameters

NameType
fIdstring
idsstring[]

Returns

Promise<boolean>

Overrides

BaseService.removeHistoryItem

Defined in

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


removeRawPage

removeRawPage(id): Promise<boolean>

Parameters

NameType
idstring

Returns

Promise<boolean>

Inherited from

BaseService.removeRawPage

Defined in

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


removeStaticFile

removeStaticFile(name, projectId): Promise<boolean>

Parameters

NameType
namestring
projectIdstring

Returns

Promise<boolean>

Inherited from

BaseService.removeStaticFile

Defined in

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


saveFile

saveFile(file): Promise<boolean>

Parameters

NameType
fileBlockSchema

Returns

Promise<boolean>

Overrides

BaseService.saveFile

Defined in

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


saveHistory

saveHistory(history): Promise<boolean>

Parameters

NameType
historyHistorySchema

Returns

Promise<boolean>

Overrides

BaseService.saveHistory

Defined in

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


saveHistoryItem

saveHistoryItem(fId, item): Promise<boolean>

Parameters

NameType
fIdstring
itemHistoryItem

Returns

Promise<boolean>

Overrides

BaseService.saveHistoryItem

Defined in

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


saveMaterials

saveMaterials(project, materials): Promise<boolean>

Parameters

NameType
projectProjectSchema
materialsMap<string, MaterialDescription>

Returns

Promise<boolean>

Overrides

BaseService.saveMaterials

Defined in

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


saveProject

saveProject(project): Promise<boolean>

Parameters

NameType
projectProjectSchema

Returns

Promise<boolean>

Overrides

BaseService.saveProject

Defined in

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


uploadStaticFile

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

Parameters

NameType
fileFile
projectIdstring

Returns

Promise<null | StaticFileInfo>

Inherited from

BaseService.uploadStaticFile

Defined in

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

Released under the MIT License.